Question
S. No
6 7
8
Define the role of preprocessor? In C, if you pass an array as an argument to a function, predict what actually gets passed? Distinguish Lvalue and Rvalue of an array element?
Write the output of the following code? void main() { int a[3][2] = {10. 20, 30, 40, 50, 60}; printf(“%d”, a[0][4]); } Find the output of the following code? void fun() { static int s; s = s+ 2; printf(“s = %d”, s);
4
4
4 4
w
4
14
15
w w
13
w .jn
tu
12
4
m ru
ld
fo
State which value is automatically assigned to those array elements that are Remember not explicitly initialized with an example? State the rule that determines the order in which initial values are assigned Remember to multi dimensional array elements? State which of the following is the correct syntax for the initialization of Remember one-dimensional array? a. num[3]={0 0 0}; b. num[3]={0,0,0}; c. num[3]={0;0;0}; d. num[3]=0 State which of the following is the correct syntax for initialization of two- Remember dimensional array? a. table[2][3]={0,0,0,1,1,1}; b. table[2][3]={ {0,0,0} {1,1,1} }; c. table[2][3]={0,1},{0,1},{0,1}; State which of the following multi-dimensional array declaration is correct Remember for realizing a 2x3 matrix? a. int m[2][3] b. int m[3][2] c. int m[3],m[2] Write the output of the following code? Remember void main() { char a[8] = “my dear students”; printf(“%s”, a); } Find the output of the following code? Understand void main() { int a[][3] = {{1, 2}, {3, 4, 5}, {5}}; printf(“%3d%3d%3d”, sizeof(a), a[0][2], a[1][2]);
or
11
4
Remember
void main() { fun(); fun(); }
10
Course Outcome
4
}
9
Remember Remember
.c om
4 5
Blooms Taxonomy Level Remember Understand
6|P ag e
4
4
4
4