91. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int y = 2;
int z = y +(y = 10);
printf("%d\n", z);
}
#include <stdio.h>
int main()
{
int y = 2;
int z = y +(y = 10);
printf("%d\n", z);
}
92. What will be the output of the following C code?
#include <stdio.h>
#define a 10
int main()
{
const int a = 5;
printf("a = %d\n", a);
}
#include <stdio.h>
#define a 10
int main()
{
const int a = 5;
printf("a = %d\n", a);
}
93. What will be the output of the following C function?
#include <stdio.h>
void reverse(int i);
int main()
{
reverse(1);
}
void reverse(int i)
{
if (i > 5)
return ;
printf("%d ", i);
return reverse((i++, i));
}
#include <stdio.h>
void reverse(int i);
int main()
{
reverse(1);
}
void reverse(int i)
{
if (i > 5)
return ;
printf("%d ", i);
return reverse((i++, i));
}
94. For which of the following, "PI++;" code will fail?
95. We want to declare x, y and z as pointers of type int. The alias name given is: intpt The correct way to do this using the keyword typedef is:
96. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 2, y = 1;
x *= x + y;
printf("%d\n", x);
return 0;
}
#include <stdio.h>
int main()
{
int x = 2, y = 1;
x *= x + y;
printf("%d\n", x);
return 0;
}
97. Relational operators cannot be used on . . . . . . . .
98. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 4;
float k = 4;
printf("%d", k)
}
#include <stdio.h>
void main()
{
int k = 4;
float k = 4;
printf("%d", k)
}
99. In the following code snippet, character pointer str holds a reference to the string . . . . . . . .
char *str = "Examveda.com\0" "programming";
char *str = "Examveda.com\0" "programming";
100. What is the size of myArray in the code shown below? (Assume that 1 character occupies 1 byte)
typedef char x[10];
x myArray[5];
typedef char x[10];
x myArray[5];
Read More Section(C Fundamentals)
Each Section contains maximum 100 MCQs question on C Fundamentals. To get more questions visit other sections.