C Technical Test – 10 | C Language Online Test

This “C Technical Test” is providing a set of technical and objective type questions to test your c programming skills.


1. What are the limits of a signed short integer?

 
 
 
 

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

 
 
 
 

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

 
 
 
 

4. What will be the output of following code?
#include<stdio.h>
main()
{
int i=30 ;
while(i > 0)
{
printf(“%d\n”, i%=5);
}
}

 
 
 
 

5. Which of the following statements is correct?

 
 
 
 

6. Find the output of following program
void main()
{
abc(3);
}
void abc(int a)
{
printf(“%d”,a);
if(a)
{
abc(a-1);
}
printf(“%d”,a);
}

 
 
 
 

7. Variables inside the parenthesis of functions declarations have _____ level access.

 
 
 
 

8. How can we find the size of the array?

 
 
 
 

9. What is the output of following C program?
#include<stdio.h>
int main()
{
int a[5]={10};
printf(“%d %d”,a[2],a[4]);
return 0;
}

 
 
 
 

10. What is the output of this C code?
#include<stdio.h>
void main()
{
char* str = “learnown”;
printf(“%c\n” , *(str++ + 2)+3);
printf(“%c\n” , *++str+2);
printf(“%c\n” , *–str-1);
}

 
 
 
 

Question 1 of 10

 

Share this