81. If the code shown below is executed on a little endian machine, then what will be the output of the following C code?
#include<stdio.h>
main()
{
int y=1;
printf("%d", (*(char*)&y));
}
#include<stdio.h>
main()
{
int y=1;
printf("%d", (*(char*)&y));
}
82. Which of the following is not possible statically in C language?
83. Name the function whose definition can be substituted at a place where its function call is made . . . . . . . .
84. If the output of the following C code is "Big endian", then what will be the value of *a is?
#include <stdio.h>
int main()
{
unsigned int i = 1;
char *a = (char*)&i;
if (*a)
printf("Little endian");
else
printf("Big endian");
getchar();
return 0;
}
#include <stdio.h>
int main()
{
unsigned int i = 1;
char *a = (char*)&i;
if (*a)
printf("Little endian");
else
printf("Big endian");
getchar();
return 0;
}
85. To have GCC inline the given function regardless of the level of optimization, we must declare the function with the attribute . . . . . . . .
86. It is possible for a processor to support both little and big endian methods.
87. If the data "ABCD" is to be stored in a little endian machine, it will be stored as . . . . . . . .
88. What will be the output of the following C code?
#include<stdio.h>
main()
{
int n,i;
n=f(6);
printf("%d",n);
}
f(int x)
{
if(x==2)
return 2;
else
{
printf("+");
f(x-1);
}
}
#include<stdio.h>
main()
{
int n,i;
n=f(6);
printf("%d",n);
}
f(int x)
{
if(x==2)
return 2;
else
{
printf("+");
f(x-1);
}
}
89. What will be the output of the following C code?
#include<stdio.h>
#define inline
inline f(char a)
{
#ifdef inline
printf("%c",a);
#endif
}
main()
{
f('a');
}
#include<stdio.h>
#define inline
inline f(char a)
{
#ifdef inline
printf("%c",a);
#endif
}
main()
{
f('a');
}