##### O Level | January 2013 | M3-R4 (Prog. and Prob. Solving Through ‘C’ Language)

1.1 If a=8, b=3 and c=-5 are integers, then value of a*b/c is

A) -4

B) -2.8

C) +2.8

D) +3

A

1.2 Which of the following is a valid identifier?

A) 1return

B) return1

C) return

D) \$return_1

B

1.3 Which of the following is a valid string constant?

A) “programming”

B) “programming

C) ‘programming

D) \$ programming \$

A

1.4 How will you free the allocated memory?

A) remove(var-name);

B) free(var-name);

C) delete(var-name);

D) dalloc(var-name);

B

1.5 If i = 8 and j = 5 are two integers, then the value of (i>0) || (j < 5) is

A) -5

B) 1

C) 0

D) +5

B

1.6 How many times "INDIA" will get printed?

#include<stdio.h>
int main()
{
int x;
for(x=-1; x<=10; x++)
{
if(x < 5)
continue;
else
break;
printf("INDIA");
}
return 0;
}

A) Infinite times

B) 11 times

C) 0 times

D) 10 times

A

1.7 A group of related data that share a common name is

A) Pointer

B) Array

C) Function

D) None of the above

B

An array is a collection of data items, all of the same type, accessed using a common name. A one-dimensional array is like a list; A two dimensional array is like a table; The C language places no limits on the number of dimensions in an array, though specific implementations may.

1.8 In ‘C’, if you pass an array as an argument to a function, what actually gets passed?

A) Value of elements in array

B) First element of the array

C) Base address of the array

D) Address of the last element of array

C

1.9 What does fp point to in the program?

#include<stdio.h>
int main()
{
FILE *fp;
fp=fopen("trial", "r");
return 0;
}

A) The first character in the file

B) A structure which contains a char pointer which points to the first character of a file

C) The name of the file

D) The last character in the file

B

1.10 Which of the following language is predecessor to ‘C’ Programming Language ?

A) A

B) B