C Language MCQ - English
A typecast is used to:
Answer : B
View More Related Question
1) What is the output of this C code?
#include <stdio.h>
int main()
{
int i = -3;
int k = i % 2;
printf("%d\n", k);
}
2) What is the output of this C code?
#include <stdio.h>
int main()
{
int a = 10;
double b = 5.6;
int c;
c = a + b;
printf("%d", c);
}
3) What is the output of this C code?
#include <stdio.h>
int main()
{
int i = -5;
i = i / 3;
printf("%d
", i);
return 0;
}
4) Consider the following program segment: main()
The correct values are:
{
int a,b,c;
b=3;
a=2;
a=2*(b++);
c=2*(++b);
}
5) What is the output of this C code?
#include <stdio.h>
int main()
{
int i = 5;
i = i / 3;
printf("%d\n", i);
return 0;
}