0% found this document useful (0 votes)
14 views4 pages

QBANK2

The document consists of fill-in-the-blank and true/false questions related to C programming concepts, including the history of the C language, operators, functions, and control structures. It covers various topics such as data types, memory allocation, and standard library functions. The questions are designed to test knowledge of C programming syntax and functionality.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

QBANK2

The document consists of fill-in-the-blank and true/false questions related to C programming concepts, including the history of the C language, operators, functions, and control structures. It covers various topics such as data types, memory allocation, and standard library functions. The questions are designed to test knowledge of C programming syntax and functionality.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

C-Programming

Fill in the blank type questions

1. The C language was originally developed from------------language.


B
2. C language was implemented in the year-----------
1972
3. C language was implemented at the ------------ laboratories.
Bell
4. The UNIX operating system was written in------------ language.
UNIX
5. A C program is basically a collection of-----------.
- functions
6. C language is well suited for------------programming.
structure
7. A---------------- character instructs the computer to move the control to the next line.
newline
8. C program execution begins from------------.
main ( )
9. Local variable which exists and retains its value even after the control is transferred to the
calling function is,------------.storage class. -static
10. An ------------ storage class can be used to declare global variable known to all the functions
in the file. -extern.
11. The relational expression 5.5<=10 is----------------
true
12. The relational expression -30>=0 is------------.
false
13. The operator “- -’’ is known as ------------ operator.
decrement
14. The operator “++’’ is known as -----------operator.
increment
15. The operator “++’’ adds the value ------------ to the operand.
1
16. The operator “- -’’ subtracts the value ------------ From the operand.
1
17. The ------------ Is equivalent to a = a+1.
++a
18. The ------------ is equivalent to a + =1.
++a
19. The ------------ is equivalent to a = a-1.
--a
20. The ----------- Is equivalent to a- = 1.
--a
21. Consider the following statement:
a=++y: where y=4,
then the value of a is ------------ - 6
22. Consider the following statement:
a=y++; y=5,
then the value of a is ------------ -5
23. Consider the following statement:
a=10;
b=++a;
then the value of b is ------------ -11

24 Consider the following statements:


a=10;
b=a++;
then the value of b is ---------------- -10
25. Consider the following statement:
x=100;
y=200
a=(x>y) >x:y;
The value of a is ------------ -200

26. The -----------operator can be used to determine the length of array and structures.
sizeof
27. The -----------operator can be used to allocate memory space dynamically to variables
during
Execution of a program. -sizeof

28. .......function returns the arc cosine of x.


acos (x)
29. ------------function returns the arc sine of x.
asin (x)
30. ------------.function returns the arc tangent of x.
atan (x)
31. ------------function returns the cosine of x.
cos (x)
32. -----------function returns the sine of x.
sin (x)
33. --------------function returns the tangent of x.
tan (x)
34. ------------function returns hyperbolic cosine of x.
cosh (x)
35. ----------------function returns hyperbolic sine of x.
sinh (x)
36. ----------------.function returns hyperbolic tangent of x.
tanh (x)
37. -------------.function is used to round off the value of x to the nearest integer.
Ceil (x)
38. ------------returns the exponential of x.
exp (x)
39. -----------function returns the absolute value of x.
fabs (x)
40. Determine the value of the following logical expression when x=10, y=15 and z=20.
Expression Result
X >y &&x x ll y > z -------------
true
42. Determine the value of the following logical expression when x=10, y=15 and z=20.
Expression Result

X+y > z && z > y -------------------


true

43. Determine the value of the following logical expression when x=10, y=15 and z=20.
Expression Result
X! = yll y = = z -------------------
true
44. The standard mathematical functions are included in the ------------..header file.
math.h
45. ----------------function can be used to read a single character.
getch ( )
46. In C, language ------------checks whether the input value of the argument c is an alphabet or
not.
isalpha (c)
47. --------------function checks whether c is lower case letter or not.
Islower (c )
48. -------------function checks whether c is upper case letter or not.
Isupper (c )
49. ------------checks whether c is an alphanumeric character or not.
Isalnum (c)
50. Repeating a set of statements for a specific number of times is called ------------ structure.
looping
51. An immediate exit from the loop can be achieved by a ------------ statement.
break
52. The ------------ statement causes the next iteration of the loop structure.
continue

True or False type questions


1. In C, upper and lower cases letter are same. False
2. C keywords can be used as variable names. False
3. A # define is a compiler directive and not a statement. True
4. # define lines should end with a semicolon. False
5. stdio.h refers to standard l/o header file. True
6. stdio.h contains mathematical functions. False
7. Every C program must have at least one main ( ) function section. False
8. Every C program ends with an END word. False
9. A printf ( ) function generate only one line of output. False
10. The basic meaning of the C keywords can be changed. False
11. The underscore character is allowed in identifiers.True
12. C language has two types of constants viz., numeric and character. True
13. In C, commas are allowed in between digits of an integer. False
14. The number -71 is not valid in C. False
15. In c language, a character constant ‘x’ is not equivalent to the single character constant “x”.
True
16. A double data type number uses 64 bits giving a precision of 14 digits. True
17. The # define statements may appear anywhere in the program. True
18. There should be a space between the pound sign (#) and the word define. False
19. #define statements must not end with a semicolon. True
20. The statement
#define X = 5.5 is invalid. True
21. The statement
# define N 5, M 25 is valid. False
22. # define N 25 is valid. True
23. x + = 3 is equivalent to x = x + 3. True
24. x = x/ (n+1) is equivalent to x / = n + 1. True
25. a (j + + ) = 25 is equivalent to a( j ) = 25. True
26. The assignment statement a = = b = c = 0; is not a valid c language. False
27. An assignment statement includes = = symbol. False
28. Char y = ‘a’ is a valid C statement. True
29. scanf ( ) function can be used to read values through keyboard. True
30. The scanf ( ) function can be used without variables list. True
31. In Scanf ( ) function, the control string represents the format of data being received. True
32. The function (float) n converts the value of n to type float. True
33. fabs (x) function returns the absolute value of x. True
34. floor (x) function rounded off the value of x , which is less than or equivalent to x. True
35. log(x) function returns the natural log of x. True
36. isalnum ( c ) checks whether c is an alphanumeric character or not. True
37. isprint ( c ) function checks whether c is a printable character or not. True
38. ispunct ( ) function checks whether c consists of a punctuation mark or not. True
39. isspace ( ) function checks c is a white space character or not. True
40. puchar (‘/n’) would move the cursor to the beginning of the next line. True
41. In C, each string is terminated by a ‘/0’ character. True
42. A string can be read using the format %s or %c. False
43. The printf variable list must be preceded by a “& ’’ symbol. False
44. “%c’’ code can be used to read/print a character. True
45. “%d’’ code can be used to read/print decimal integer. True
46. “%e’’ code can be used to read/print floating point values with exponent. True
47. “%f’’ code can be used to read/print floating point values without exponent. True
48. The statement
Scanf(“%d,%d’’, & d1, & d2);
Can be used to read two decimal integer values in C language. True
49. “%s” format can be used to read/print a string. True
50. “%u” format is used to read/print an unsigned decimal integer. True
51. If statement represents the evaluated result in the form of either non-zero or zero
values. True
52. Nested if statement is not allowed in C. False
53. In switch statement, the default case is optional. True
54. In switch statement, two cases can have the same option. False
55. In switch statement, each case should be enclosed by a parenthesis. False
56. In switch statement, each case must be terminated by a break statement. True
57. The statement go to 20; is valid in C. False
58. In switch statement, cases and default clause may occur in any order. True
59. Body of the do..while statement is executed at least once. True
60. While statement executes its body only if the condition is false. False
61. The continue statement cannot be used with switch statement. True
62. The process of a function calling itself is called as recursive function. True
63. The strlen (s) function returns the length of the string s. True
64. strcpy (s1, s2) function copies s2 to s1. True
65. stract (s1, s2) concatenates s2 at the end of s1. True
66. pointers are usually denoted by the operator “&”. True
67. In C language, an array starts from the position zero. True

You might also like