C Technical Test – 4 | C Language Online Test

This “C Technical Test” is providing a set of questions to test your skills in C logical and technical programming and providing result with grading system.


1. What is the use of ASCII?

 
 
 
 

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

 
 
 
 

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

 
 
 
 

4. What is the output of following code?
#include <stdio.h>
void main()
{
int x = 3;
x++;
if (x <= 5)
{
printf(“hi\n”);
main();
}
}

 
 
 
 

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

 
 
 
 

6. Which of the following is an invalid pointer declaration?

 
 
 
 

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

 
 
 
 

8. How can we return a string function in C program?

 
 
 
 

9. What is the output of this C code?
void main()
{
int arr[5] = {10,20,30,40,50},i;
int* ptr;
ptr = arr;
printf(“%u\n”, *++ptr + 3);
printf(“%u\n”, *(ptr– + 2) + 5);
printf(“%u\n”, *(ptr+3)-10);
}

 
 
 
 

10. Difference between structure, union, and enumeration?

 
 
 
 

Question 1 of 10

 

 

Share this