Programming & Problem Solving Through Language: Total Time: 3 Hrs
Programming & Problem Solving Through Language: Total Time: 3 Hrs
Programming & Problem Solving Through Language: Total Time: 3 Hrs
1. Each question below gives multiple choice of answer. Choose the most appropriate
one.
1.1 Which of the following software translates source code into object code?
a) Compiler b) Interpreter
c) Assembler d) Preprocessor
a) float b) main
c) switch d) continue
……….
……….}
a) function(arr, 6) b) r=function(arr[ ], 6)
a) double b) int
c) void d) long
a) >= b) =
c) < d) <=
a) float b) integer
c) character d) enum
1.7 A group of same data type that call by a common name is________
a) Structure b) Union
c) Pointer d) Array
a) auto b) extern
c) dec d) static
1.9 What will be the output of the following code segment if “LOVE YOU” is given as input?
main{
char a[10];
scanf(“%s”,a);
printf(“%s”,a);}
void fun(){
printf(“%d”,++i);}
Main() {
fun();
fun();}
a) 26 27 b) 25 25
c) 26 26 d) 27 27
2. Each statement below is either TRUE or FLASE. Choose the most appropriate one.
2.2 If no storage class is mentioned for a variable defined in a function then it is by default auto.
2.8 Calloc function is used to release the memory allotted in dynamic memory allocation.
2.10 fseek function is used to change the memory size already allocated dynamically.
3. Match words and phrases in column X with the closest related meaning/ word(s)/
phrase(s) in column Y.
X Y
3.1 Structure A Loop execute at least one time
3.2 While(1) B *
3.4 Break D ?:
K Infinite loop
M 2 bytes
N ---->
4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the
list below
4.2 ________function is used to release the memory allotted in dynamic memory allocation.
4.3 ___________ are used when we want to test more than one condition and make decision.
4.6 The ________ is a program that is executed before the source code complied.
4.9 The function “fseek” provide a way to read or write a file in ________ order.
4.10 NULL is a macro constant which has been defined in the header file_________.
PART - TWO