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

Show Answer


1.2 Which of the following is a valid identifier?

A) 1return

B) return1

C) return

D) $return_1


B

Show Answer


1.3 Which of the following is a valid string constant?

A) “programming”

B) “programming

C) ‘programming

D) $ programming $


A

Show Answer


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

Show Answer


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

Show Answer


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

Show Answer


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.

Show Answer


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

Show Answer


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

Show Answer


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

A) A

B) B

C) ADA

D) C++


B

The immediate predecessor of C is a language called B, created by Ken Thompson as part of the early development of the Unix operating system. B was in turn based on a language called BCPL, which was a variant of CPL intended for system programming such as compiler writing.

Show Answer


Exam Back Paper (Solved)


July 2013 | M4.3-R4 (Introduction to ICT Resources)


July 2013 | M3-R4 (Prog. and Prob. Solving Through ‘C’ Language)


July 2013 | M2-R4 (Internet Technology and Web Design)


July 2013 | M1-R4 (IT Tools and Business Systems)


January 2013 | M4.3-R4 (Introduction to ICT Resources)


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


January 2013 | M2-R4 (Internet Technology and Web Design)


January 2013 | M1-R4 (IT Tools and Business Systems)


July 2012 | M4.3-R4 (Introduction to ICT Resources)


July 2012 | M3-R4 (Prog. and Prob. Solving Through ‘C’ Language)


July 2012 | M2-R4 (Internet Technology and Web Design)


July 2012 | M1-R4 (IT Tools and Business Systems)


January 2012 | M4.3-R4 (Introduction to ICT Resources)


January 2012 | M3-R4 (Prog. and Prob. Solving Through ‘C’ Language)


January 2012 | M2-R4 (Internet Technology and Web Design)


January 2012 | M1-R4 (IT Tools and Business Systems)


July 2011 | M4.3-R4 (Introduction to ICT Resources)


July 2011 | M3-R4 (Prog. and Prob. Solving Through ‘C’ Language)


July 2011 | M2-R4 (Internet Technology and Web Design)


July 2011 | M1-R4 (IT Tools and Business Systems)


January 2011 | M4.3-R4 (Introduction to ICT Resources)


January 2011 | M3-R4 (Prog. and Prob. Solving Through ‘C’ Language)


January 2011 | M2-R4 (Internet Technology and Web Design)


January 2011 | M1-R4 (IT Tools and Business Systems)


July 2010 | M4.3-R4 (Introduction to ICT Resources)


July 2010 | M3-R4 (Prog. and Prob. Solving Through ‘C’ Language)


July 2010 | M2-R4 (Internet Technology and Web Design)


July 2010 | M1-R4 (IT Tools and Business Systems)