‘C’ programs are converted into machine language with the help of an interpreter.

Each statement below is either TRUE or FALSE. Choose the most appropriate one
and ENTER in the “tear-off” sheet attached to the question paper, following
instructions therein.
2.1 ‘C’ programs are converted into machine language with the help of an interpreter.
2.2 Every ‘C’ program must contain a main( ).
2.3 Putchar( ) is used only for single character input.
2.4 calloc(…) allocates a block of memory for an array of elements of a certain size.
2.5 A printf( ) statement can generate only one line of output.
2.6 A switch expression can be of any data type.
2.7 ‘While’ is an entry as well as exit controlled loop statement.
2.8 ‘C’ treats character string simply as arrays of characters.
2.9 A function in ‘C’ should have at least one argument.
2.10 sprintf(…) writes data to the character array whereas printf(…) writes data to the
standard output device.

Regarding the scope of the variables; identify the incorrect statement

1.10 Regarding the scope of the variables; identify the incorrect statement:
A) automatic variables are automatically initialized to 0
B) static variables are automatically initialized to 0
C) the address of a register variable is not accessible
D) static variables cannot be initialized with any expression

Given the piece of code

1.9 Given the piece of code
int a[50];
int *pa;
pa=a;
To access the 6th element of the array which of the following is incorrect?
A) *(a+5)
B) a[5]
C) pa[5]
D) *(*pa + 5)

What does the following function print

1.8 What does the following function print?
func(int i)
{if(i%2) return 0;
else return 1;}
main( )
{
int=3;
i=func(i);
i=func(i);
printf(“%d”, i);
}
A) 3
B) 1
C) 0
D) 2