Menu Close

C Exam on Variables

Try to answer all questions – You can check result once the test has been completed

Please enter your email:

1.

What is local variable?

 
 
 
 

2.

Find the Output:

#include<stdio.h>
float x ;
int main()
{
  int a=3;
  printf("%f", a+x);
  return 0;	
}

 

 
 
 
 

3.

What is variable?

 
 
 
 

4.

Find the Output:

#include<stdio.h>
int main()
{
  int a=5,b=3 ;
  printf("%d\b%d",a,b);
  return 0;	
}

 

 
 
 
 

5.

Find the Output:

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

 

 
 
 
 

6.

Find the Output:

#include<stdio.h>
int main()
{
  clrscr();
  int a=10;
  printf("%d", a);
  return 0;	
}

 

 
 
 
 

7.

Find the Output:

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

 

 
 
 
 

8.

Find the Output:

#include<stdio.h>
void main()
{
  short int a=5, b=10;
  a=b-a;
  a=a+b;
  printf("%d, %d", a+b+a, b+a+b);
}

 

 
 
 
 

9.

Where we can declare local variables?

 
 
 
 

10.

Find the Output:

#include<stdio.h>
void main()
{
  printf("%d%d\b\b%d",1,2,3);
}

 

 
 
 
 

Question 1 of 10