Menu Close

C exam on datatypes

Please enter your email:

1.

What are the limits of a signed short integer?

 
 
 
 

2.

Output of following Code?

#include<stdio.h>
int main()
{
  float f = 258.78;
  short s = f ;
  char c = s ;
  printf("%d", c);
  return 0;
}

 

 
 
 
 

3.

Choose correct sentence among following:

 
 
 
 

4.

Output of following Code?

#include<stdio.h>
int main()
{
    double num=6.2;
    int var=10;
    printf("%d ",sizeof(!num));
    printf("%d ",sizeof(var/2));
    printf("%d ",var);
    return 0;
}

 

 
 
 
 

5.

Output of following Code?

#include<stdio.h>
int main()
{
  int a=10, c=20;
  long f;
  c = sizeof(a+f);
  printf("%d",c);
  return 0;
}

 

 
 
 
 

6.

Output of following Code?

#include<stdio.h>
#include<limits.h>
int main()
{
  printf("%d", USHRT_MAX);
  return 0;
}

 

 
 
 
 

7.

Pre-defined variable to display signed integer minimum value?

 
 
 
 

8.

What is Character system?

 
 
 
 

9.

Output of following Code?

#include<stdio.h>
int main()
{
  signed short s = -32774 ;
  printf("%u", s);
  return 0;
}

 

 
 
 
 

10.

Output of following Code?

#include<stdio.h>
int main()
{
  short s = 65536 ;
  printf("%d , %u", s, s);
  return 0;
}

 

 
 
 
 

Question 1 of 10