C Technical Test – 1

These C technical tests on C programming makes you ready for interviews and let you know how good you are in C technical skills.


 

1. What is the Output of following Code?
#include<stdio.h>
char ch ;
float f ;
void main()
{
printf(“%d, %f”, ch, f);
}

 
 
 
 

2. What is the Output of following Code?
#include<stdio.h>
void main()
{
double PI = 3.142 + 0.0001111;
printf(“%f “, PI);
}

 
 
 
 

3. What is an unsigned integer?

 
 
 
 

4. What is the Output of following Code?
#include<stdio.h>
int main()
{
int a = 8;
printf(“%d , %d”, a << 1,a << 2);
return 0;
}

 
 
 
 

5. What is the Output of following Code?
#include<stdio.h>
main()
{
int x=5 , y=3;
x++ ? –y : ++x ;
printf(“%d,%d”,–x , –y);
}

 
 
 
 

6. Pick the odd statement?

 
 
 
 

7. What will be the output of following code?
#include<stdio.h>
int main()
{
int i=4,j=5;
while(i+1?i–:j++);
printf(“%d”,i);
return 1;
}

 
 
 
 

8. What will be the output of following code?
#include<stdio.h>
main()
{
signed char ch = 120;
while(++ch)
{
printf(“%d\t”,ch);
}
}

 
 
 
 

9. Which of these selection statements test only for equality?

 
 
 
 

10. Can we use a switch statement to switch on strings?

 
 
 
 

Question 1 of 10

 

Share this