C Quiz

Welcome to the C Quiz.

 

Enter your name
1. Which function would you use to convert 1.98 to 1?
2. What will be the output of below C Program
#include<stdio.h>
int main()
{
int arr[2] = {1, 2};
printf("%d", 1[arr]);
return 0;
}
3. Guess the output of code below
#include<stdio.h>
int main()
{
int arr[2] = {1, 2};
printf("%d", -1[arr]);
return 0;
}
4. What will be the output of below C Program
#include<stdio.h>
int main()
{
int a, b;
a=b=0;
a++;
b = b++;

printf("%d %d", a, b);
return 0;
}
5. Guess the output
#include
int main()
{
int m=5, s=2;

m += ++s;

printf("%d %d", m, s);
return 0;
}
6. Which of the following is correct variable name/identifier in C?
7. Choose the correct output
#include<stdio.h>
int main()
{
int m=5;
{
int m=10;
}
printf("%d", m);

return 0;
}
8. Why is a macro used in place of a function?
9. How many times will the following for loop execute?
#include<stdio.h>
int main()
{
int i;

for(i=0; i<5; i+=0.5)
printf("1");

return 0;
}
10. Which of the following language is fast as compared to speed of execution

Admin

Back to top