1) The C language consists of ____ number of keywords.
A] 32
B] 40
C] 24
D] 56
2) Which of the following is a keyword used for a storage class?
A] Printf
B] external
C] auto
D] scanf
3) The prototype of the function in the header file is
A] Stdio.h
B] stdlib.h
C] conio.h
D] io.h
4) Preprocessor Directives are used for -
A] Macro Expansion
B] File Inclusion
C] Conditional Compilation
D] All of these
5) Which operator has the lowest priority?
A] ++
B] %
C] +
D] ||
6) The type cast operator is
A] (type)
B] cast()
C] //
D] “ “
7) File manipulation functions in C are available in which header file?
A] streams.h
B] stdio.h
C] stdlib.h
D] files.h
8) Which pair of functions below are used for the single character I/ O?
A] getchar() and putchar()
B] scanf() and printf()
C] input() and output()
D] Non of these
9) Which function is used to read the character as you type?
A] getchar()
B] getch()
C] getche()
D] Both (B) and (C)
10) What is the output of this program ?
void main()
{
int a=b=c=10;
a=b=c=50;
printf(“\n %d %d %d”,a,b,c);
}
A] 50 50 50
B] Compile Time Error
C] 10 10 10
D] Three Gaebage Value
11) Which format specifier is used to print the values of the double type variable
A]%If
B]%Id
C]%Iu
D] %f
12) What will be the output of the following program?
void main ( )
{
double x=28;
Int r;
r= x%5;
printf (“\n r=%d”, r);
}
A] r= 3
B] Run time Error
C]Compile time Erroe
D]None of the Above
13) What the following function call mean?
Strcpy(s1 , s2 );
A]copies s1 string into s2
B]copies s2 string into s1
C]copies both s1 and s2
D] None of these
14) What will be the output of the following program?
Void main( )
{
int x []= {10,20,30,40,50};
print f (“ \n %d %d %d %d “, x [4] ,3[x] ,x[2] ,1[x] ,x[0] );
}
A]Error
B]10 20 30 40 50
C]50 40 30 20 10
D]None of these
15) Which of the following is not s keyword of ‘C’ ?
A] auto
B] register
C] int
D] function
16) What will be the out put ?
void main ( )
{
char a[] = “INFO” ;
a + +;
printf (“ \n %s”, a);
}
A] Error
B] INFO
C] NFO
D] None of these
17) Which of the following operator has the right to left associativity?
A] &&
B] //
C] %
D] sizeof
18) What wiil be the out put ?
void main ( )
{
int I ;
I=0x10+ 010+10;
Printf (“\nx=%x”, i);
}
A] x= 34
B] i= 34
C] I = 22
D] Error
19) Explicit type conversion is known as
A] conversion
B] disjunction
C] separation
D] casting
20) What will be the output ?
#define SQUARE(X) X * X
void main ( )
{
printf (“\n Square = %d” , SQUARE(10+2) );
}
A] Square = 144
B] Square =32
C] Square =122
D]Square =12
21) By default, a function returns a value of type
A] int
B] char
C] void
D] None of these
22) What will be the value of x after executing the program ?
void main ( )
{
int x;
x = printf(“I See, Sea in C”);
printf(“\n x= % d” , x);
}
A] x= 15
B] x=2
C] Garbage value
D] Error
23) What is sizeof In ‘C’ ?
A] Operator
B] Reserve Worf
C] Both (A) and (B)
D] Function
24) Study the following C program
Void main ( )
{
int a= 0;
for ( ; a ;);
a++;
}
What will be the value of the variable a, on the execution of the above program
A] 1
B] 0
C] –1
D] None of these
25) Which is not keyword in ‘C’ ?
A] typedef
B] const
C] near
D] complex
Answers aren't available of these mcqs?
ReplyDelete