1.
How would you copy the name “Hello” to a character array (i.e. string) declared as char str[10];
A. 
B. 
C. 
D. 
2.
count=0;
for ( I=0;I<=10; I++)
{if(I%2==0)
count++;
}printf(“%d”, count);
Pick out the correct value for count
A. 
B. 
C. 
D. 
3.
The value within the [] brackets in an array declaration specifies
A. 
Value of the array element
B. 
C. 
D. 
4.
Compute the result of the following expression in ‘C’. A=3*4/5+10/5+8-1+7/8
A. 
B. 
C. 
D. 
5.
Dynamic memory allocation in array results in
A. 
Allocation of memory at debugging time
B. 
Allocation of memory at file saving time
C. 
Allocation of memory at compile time
D. 
Allocation of memory at runtime
6.
What is the output of the following module
sum=0; I=0;
do{ sum+=I;
I++;
}while(I<=5);
printf(“%d”, sum);
A. 
B. 
C. 
D. 
7.
Which of the follwing is a string
A. 
B. 
C. 
D. 
8.
Give the output of the following program:
#include < stdio.h >
main()
{int I=1;
while (I < 5)
{printf(“%d”, I);
}}
/* End of Main */
A. 
Print the value of I as 1
B. 
Warning for no return type for main ( )
C. 
D. 
Prints the value of I as11111
9.
What will happen if you try to put so many values into an array during the initalization such that its size is exceeded
A. 
Error message from the compiler
B. 
Possible system malfunction
C. 
Last element data may be overwritten
D. 
10.
Which of the following statements would read a single character from the keyboard and place the result in a character variable ‘ch’ defined as: char ch;
A. 
B. 
C. 
D. 
11.
consider the array definition
int num [10] = { 3 ,3 ,3 };
pick the correct answers
A. 
This is syntactically wrong
B. 
C. 
This is invalid if it comes within a function
D. 
12.
Output of the below program
#include<stdio.h>
main()
{int a,b=0;
int c[10]={1,2,3,4,5,6,7,8,9,0 };
for(a=0;a<10;++a)
b+=c[a];
printf(“%d”,b);
}
A. 
1 3 6 10 15 21 28 32 45 45
B. 
C. 
D. 
13.
The maximum number of dimension an array can have in C language is
A. 
B. 
C. 
D. 
14.
What is the result of the expression ( 10/3 )*3+5%3 ?
A. 
B. 
C. 
D. 
15.
Array subscripts in ‘C’ always start at
A. 
B. 
C. 
D. 
16.
The statements that prints out the character set from A-Z is, where a is an integer variable
A. 
B. 
C. 
D. 
17.
The amount of storage required for holding elements of the array depends on
A. 
B. 
C. 
D. 
18.
If we don’t initialize a static array, what will be the elements set to:
A. 
B. 
C. 
D. 
19.
What is wrong with the following program
main() { char m1[9]= “message1”; char m2[9]=“message2”; m2=m1;
printf(“msg is %s”,m2); }
A. 
Char array cannot be printed directly using printf
B. 
Array is not a left value and so cannot be assigned to
C. 
Program compiles without error, but prints an unpredictable value
D. 
Array cannot be initialized as above
20.
The total memory required for an array
A. 
B. 
Size of (datatype) * size of used array elements
C. 
Sizeof (datatype) * sizeof array
D. 
Size of (array) * datatype
21.
How many bytes will be allotted for the declaration int num[4] [3]
A. 
B. 
C. 
D. 
22.
If statement is a —————statement
A. 
B. 
C. 
D. 
23.
What is the output of the following program
main()
{static int y;
printf (“%d\n”, y);
}
A. 
B. 
C. 
D. 
24.
printf (“\ “ well done\” ”); what will be the output of this statement
A. 
B. 
C. 
D. 
25.
Which of the following is not correct
A. 
While loop is executed atleast once
B. 
Do . while loop is executed at least once
C. 
While loop is executed only if the condition is true
D. 
Dowhile loop is ececuted only if the condition is true