C Practice Test on Data types

This “Top 10 C Practice Test Questions on Datatypes ” providing set of technical and objective type questions on Data types to test your programming skills.


1. What is the Output of following Code?
#include<stdio.h>
void main()
{
short s = 65536 ;
printf(“%d , %u “, s, s);
}

 
 
 
 

2. What is the Output of following Code?
#include<stdio.h>
void main()
{
signed short s = -32774 ;
printf(“%u”, s);
}

 
 
 
 

3. What is the Output of following Code?
#include<stdio.h>
void main()
{
signed short s = 612 ;
printf(“%c”, s);
}

 
 
 
 

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

 
 
 
 

5. What is character system?

 
 
 
 

6. What is the pre-defined variable name to print signed integer minimum limit value?

 
 
 
 

7. What is the Output of following Code?
#include <stdio.h>
int main(void)
{
int f = 4;
printf(“%d %d\n”,f);
return 0;
}

 
 
 
 

8. What is the Output of following Code?
#include<stdio.h>
void main()
{
float f = 256.78;
short s = f ;
char c = s ;
printf(“%d “, c);
}

 
 
 
 

9. What is size_t?

 
 
 
 

10. What is the Output of following Code?
#include<stdio.h>
#include<limits.h>
void main()
{
printf(“%d”, USHRT_MAX);
}

 
 
 
 

Question 1 of 10

Share this