STAR INSTITUTE OF TECHNOLOGY & MANAGEMENT
Time: - 2 Hr. Programming in ‘C’ Test MM 100
( A ) Multiple Choice Question: - [10]
1. The && operator
a) Compare two numeric values b) Combine two numeric values
c) Compare one numeric values d) Perform none of the above.
2. The result of the expression x=30 + 2 * 4 – 6 * 1 is
a) x =30 b) x=32
c) x =45 d) None of the above.
3. In ‘C’ Language reserve word is also known as:-
a) Operator b) Keyword
c) Character d) None of these.
4. int a=3, b;
b=++a;
printf(“%d”,++b); will print the value:-
a) 5 b) 4
c) 3 d) 0
5. int a[10]={1,3,5,7,9,11,13,15,17,19};
printf(“%d”,a[6]); will print the value:-
a) 11 b) 13
c) 9 d) 6
(B). Place TRUE / FALSE in the Box: - [10]
1. + is a unary operator. [ ]
2. 5%3 gives result 2. [ ]
3. While loop ends with a semicolon. [ ]
4. We can use switch statement in place of if- else. [ ]
5. The keyword can also be used as variable name. [ ]
6. The symbol = = is an assignment operator. [ ]
(C) Fill in the Blanks: - [10]
[string.h, Compiler, &, Binary, False, &&, True, 10, while, char, 2, int ,||, math.h, Assembler, 4, for, unary, do while]
1. On executing f=!(0>10), f will have values …………………..
2. A ……………… converts High Level language program to Machine code.
3. ………………... is called pre tested loop.
4. In ‘C’ Logical OR operator is represented as ………………..
5. The expression ! (11>9 && 6!=23) will give result as ………………….. .
(D) Match the following: - [10]
1. To execute a set of statements number of times f) Group of variables
2. To print escape character g) 2 bytes
3. Graphical representation of program h) Prints output on the screen
4. Array i) Loop
5. Copy j) 1 byte
k) \
( E) Descriptive Questions: - [60]
1. Answer the following: -- (Attempt any 5) [6 x 5 = 30]
a. Write a program to find out the Factorial of input number.
b. Write a program to print the table of input number.
c. What is variable? And what points we should remember for variable.
d. What is Switch? How can we initialize and declare Switch in our ‘C’ program?
e. Write a program to accept any 3 no and display Max number between 3 no.
f. Define different type of operator.
2. Write short Note On: - (Any Five) [6 x 5 = 30]
a. Array b. Loop c. If Statement d. Datatype e. Variable f. Functions
5. Write the program to display the following [15]
i) 4 ii) * iii) 1
3 3 * * 12
2 2 2 * * * 123
1 1 1 1 * * * * 1234