1. What will be the output of the following C code?
#include <stdio.h>
int main()
{
printf("C programming %s", "Class by\n%s Shyam", "WOW");
}
#include <stdio.h>
int main()
{
printf("C programming %s", "Class by\n%s Shyam", "WOW");
}
2. function tolower(c) defined in library works for . . . . . . . .
3. Associativity of an operator is . . . . . . . .
4. What will be the output of the following C code?
#include <stdio.h>
void main(
{
double b = 8;
b++;
printf("%lf", b);
}
#include <stdio.h>
void main(
{
double b = 8;
b++;
printf("%lf", b);
}
5. What will be the output of the following C code?
#include<stdio.h>
enum class
{
a,b,c
};
enum class m;
main()
{
printf("%d",sizeof(m));
}
#include<stdio.h>
enum class
{
a,b,c
};
enum class m;
main()
{
printf("%d",sizeof(m));
}
6. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 97;
int y = sizeof(x++);
printf("x is %d", x);
}
#include <stdio.h>
void main()
{
int x = 97;
int y = sizeof(x++);
printf("x is %d", x);
}
7. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 1, b = 1, c;
c = a++ + b;
printf("%d, %d", a, b);
}
#include <stdio.h>
int main()
{
int a = 1, b = 1, c;
c = a++ + b;
printf("%d, %d", a, b);
}
8. What will be the data type of the following expression? (Initial data type: a = int, var1 = double, var2 = float)
expression (a < 50)? var1 : var2;
expression (a < 50)? var1 : var2;
9. Why do variable names beginning with the underscore is not encouraged?
10. Which of the following method is accepted for assignment?
Read More Section(C Fundamentals)
Each Section contains maximum 100 MCQs question on C Fundamentals. To get more questions visit other sections.