Sample Question Bank_C
Sample Question Bank_C
1 i=10;
j=++i;
i++;
then i=_____ and j=_______
8 While (1)
{
printf(“ Hello”);
}
How many times execute above loop?
a) 1 b) 10 c) infinite time d) finite time
9 Identified from the following after which statement; is required.
a) for b) nested if c) continue d) none of these
10 ___________ types of control structure available in C language.
a) 1 b) 2 c) 3 d) 4
1) int 2) float
3) string 4) All of above.
19 Reading a specified number of character from the input string ___________is use in scanf
Function.
1) %d 2) %S
3) %ws(w=number) 4) %ld
20 Reading single character form the keyboard __________________function is use.
1) putchar( ) 2) getchar()
3) getc() 3) putc()
21 ________function is use for reading the string with the whitespace.
1) gets() 2) puts()
3) getc() 3) putc()
22 gets () function is available in _____________header file.
1) <stdio.h> 2) <conio.h>
3) <math.h> 4) All of above
23 The function putchar ( ) requires ____________parameter.
1) One 2) Two
3) Three 4) Four
24 puts () function is available in _____________header file.
1) <stdio.h> 2) <conio.h>
3) <math.h> 4) All of above
25 What is the O/P of the following code in arithmetic code on character?
x = ‘z’-1;
1) x = 121 2) x = 125
3) x = 112 4) None of these
26 The ______________string function is use to joins two string.
1) strcat() 2) strlen()
3) strupr() 4) strrev()
27 If both the string are same then the comparison value is ___________
1) Zero 1) One
3) Minus One 4) None of these
28 strcmp () function is use for __________ two string.
1) Concate 2) Join
3) Compare 4) All of above
29 strcmp(“ABCD”,”abcd”) = _________________
1) 0 2) 32
3)-32 4) -1
30 strcpy () function works like ____________operator.
1) assignment 2) logical
3) bit-wise 4) relational
31 Assign the value of one string into another string ____________function is use.
1) strcpy() 2) strlen()
3) strupr() 4) strrev()
32 _________ function count and return the number of character in a string.
1) strcpy() 2) strlen()
3) strupr() 4) strrev()
33 _____________function is use for reverse the string.
1) strcpy() 2) strlen()
3) strupr() 4) strrev()
34 Command line argument : main(int argc ,char *argv[])Consider the above example the
_______________variable is count the number of argument in command line.
1) argc 2) argv
3) int 4) main( )
1. Define array? Also explain declaration of 1D and 2D array with syntax and example.
2. Explain initialization of 1D array with syntax and example.
3. Explain initialization of 2D array with syntax and example.
4. Explain arithmetic operation in character with example.
5. Explain gets and puts function with syntax and example.
6. Explain command line argument in c with example.
7. Define 1D array? Explain the declaration and initialization of 1D array with syntax and example.
8. Define 2D array? Explain the declaration and initialization of 2D array with syntax and example.
9. Explain following function with syntax and example.
1 ) strlen ( ) 2) strcat ( )
3) strcpy ( ) 4) strrev ( )
10. Explain following function with syntax and example.
1) strcmp ( ) 2) gets ( )
3) puts ( ) 4) strrev ( )
18 If the function are declare in the global declaration section the prototype is referred
as ____________________prototyped.
1) global 2) local
3) formal 4) none of these
19 If the function are declare in the local declaration section the prototype is referred
as ____________________prototyped.
1) global 2) local
3) formal 4) none of these
20 User Defined Function can be classified in to ___________category.
1) one 2) two
3) three 4) four
21 isdigit( ) function is available in _____________________
1) <stirng.h> 2) <ctype.h>
3) <conio.h> 4) <math.h>
22 Abs ( ) function is available in _____________________
1) <stirng.h> 2) <stdlib.h>
3) <conio.h> 4) <math.h>
23 ______________is return the absolute value.
1) abs( ) 2) isdigit( )
3) isupper( ) 4) islower( )
24 isalpha( argument ) function is return ________________ where the argument is not alphabetic
1) zero 2) one
3) three 4) none of these
25 isupper( ) function is available in _____________________
1) <stirng.h> 2) <ctype.h>
3) <conio.h> 4) <math.h>