Home
Subjects
Chemistry
(2110001)
CS
(2110002)
CPU
(2110003)
ECE
(2110004)
EEE
(2110005)
EME
(2110006)
ES
(2110007)
Physics
(2110011)
EG
(2110013)
Calculus
(2110014)
VCLA
(2110015)
BE
(2110016)
About Us
Contact Us
Computer Programming and Utilization
(2110003)
Summer 2016 Sem-2
MCQ(s) of
Computer Programming and Utilization
(2110003)
- Summer 2016 Sem-2
Q.
1
Which of the following is ternary operator?
(A) ??
(B) :?
(C) ?:
(D) ::
Answer
(C)
?:
Q.
2
Which header file is essential for using scanf() function?
(A) ctype.h
(B) string.h
(C) conio.h
(D) stdio.h
Answer
(D)
stdio.h
Q.
3
A declaration float sum, value; occupies _____ of memory?
(A) 2 byte
(B) 4 byte
(C) 6 byte
(D) 8 byte
Answer
(D)
8 byte
Q.
4
Array index start at
(A) 1
(B) User Defined
(C) 0
(D) None of above
Answer
(C)
0
Q.
5
When function calls itself, it is known as ______.
(A) Recursion
(B) exit control loop
(C) Nested loop
(D) user defined function
Answer
(A)
Recursion
Q.
6
Default value of global variable is
(A) 0
(B) 1
(C) Garbage value
(D) Depend on data type
Answer
(A)
0
Q.
7
When fopen() fails to open a file it returns
(A) NULL
(B) 1
(C) -1
(D) None of above
Answer
(A)
NULL
Q.
8
Default value of local variable is
(A) 0
(B) 1
(C) Garbage value
(D) Depend on data type
Answer
(C)
Garbage value
Q.
9
ASCII value of ‘A’ is _____.
(A) 55
(B) 65
(C) 75
(D) 85
Answer
(B)
65
Q.
10
MACRO is used to _______________.
(A) Save memory
(B) fast execution
(C) Both a & b
(D) none of above
Answer
(B)
fast execution
Q.
11
Every string is terminated by NULL character. How it is represented?
(A) ‘\0’
(B) NULL
(C) Both a & b
(D) none of above
Answer
(A)
‘\0’
Q.
12
Which are not looping structures?
(A) For loop
(B) While loop
(C) Do...while loop
(D) if…else
Answer
(D)
if…else
Q.
13
If ptr is a pointer to int, having value ptr=100. After ptr++, what is the value of ptr?
(A) 100
(B) 101
(C) 102
(D) 103
Answer
(C)
102
Q.
14
How many times the following code prints the string “hello”
for(i=1;i<=50;i++)
printf(“Hello”);
(A) 1
(B) 50
(C) Zero
(D) None of them
Answer
(B)
50