31. C99 standard guarantees uniqueness of . . . . . . . . characters for internal names.
32. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 0;
double b = k++ + ++k + k--;
printf("%d", k);
}
#include <stdio.h>
void main()
{
int k = 0;
double b = k++ + ++k + k--;
printf("%d", k);
}
33. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 8;
int m = 7;
k < m ? k = k + 1 : m = m + 1;
printf("%d", k);
}
#include <stdio.h>
void main()
{
int k = 8;
int m = 7;
k < m ? k = k + 1 : m = m + 1;
printf("%d", k);
}
34. Which of the following is not a valid variable name declaration?
35. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = 3;
int b = ++a + a++ + --a;
printf("Value of b is %d", b);
}
#include <stdio.h>
void main()
{
int a = 3;
int b = ++a + a++ + --a;
printf("Value of b is %d", b);
}
36. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0;
int x = i++, y = ++i;
printf("%d % d\n", x, y);
return 0;
}
#include <stdio.h>
int main()
{
int i = 0;
int x = i++, y = ++i;
printf("%d % d\n", x, y);
return 0;
}
37. Which is valid C expression?
38. What will be the output of the following C code?
#include<stdio.h>
int main()
{
int a = 1, b = 2, c = 3, d = 4, e;
e = c + d = b * a;
printf("%d, %d\n", e, d);
}
#include<stdio.h>
int main()
{
int a = 1, b = 2, c = 3, d = 4, e;
e = c + d = b * a;
printf("%d, %d\n", e, d);
}
39. While swapping 2 numbers what precautions to be taken care?
b = (b / a);
a = a * b;
b = a / b;
b = (b / a);
a = a * b;
b = a / b;
40. What is the problem in the following variable declaration?
float 3Bedroom-Hall-Kitchen?;
float 3Bedroom-Hall-Kitchen?;
Read More Section(C Fundamentals)
Each Section contains maximum 100 MCQs question on C Fundamentals. To get more questions visit other sections.