More Classes
5th Class
6th Class
7th Class
8th Class
9th Class
10th Class
11th Class
12th Class
NAT I
NAT II
CSS
IQ
General Knowledge
MDCAT
ECAT
GAT General
GAT Subject
Other Links
Go to Home
Online Tests
PPSC Computer Science Chapter 8 C Programming Online Test MCQs With Answers
Question # 1
How many union members can be initialized.
Choose an answer
Only one member of union at any one time.
Any number of members of a union at one time
Union members can not be initialized
Only two members of a union at any one time.
Previous
Skip
Next
Question # 2
Given b=110 and c =20, what is the value of 'a' after execution of the expression a = b -= c + =5?
Choose an answer
10
450
110
-10
Previous
Skip
Next
Question # 3
With the following declaration , the correct answer is.enum rgb (red = -1, green , blue)
Choose an answer
red = -1, green = -2, blue = -3
red = -1 , green = 0 blue = 1
red = -1 , green = 2 blue = 3
All above alternative are illegal declarations.
Previous
Skip
Next
Question # 4
The storage class controls
Choose an answer
Life time of a variable
Linkage of a variable
Scope of a variable
a , b and c above
Previous
Skip
Next
Question # 5
What is the associatively of the conditional operator.
Choose an answer
Left to Right
Right to left
Top to bottom
None of the above
Previous
Skip
Next
Question # 6
The address of the starting element of an array is.
Choose an answer
Represented by subscripted variable of the starting element.
Represented by the array name
Not used by the compiler
Represented by the size of the array
Previous
Skip
Next
Question # 7
In mixed mode expressions.
Choose an answer
Operands of lower type get automatically converted to higher type
Operands of higher type get automatically converted to lower type.
Operands of higher and lower type get in there changed
Operands of lower type get automatically converted to lower type.
Previous
Skip
Next
Question # 8
The storage class of a local variable is
Choose an answer
Auto
Static
Extern
Register
Previous
Skip
Next
Question # 9
What is the correct value to return to the operating system upon the successful completion of a program
Choose an answer
1
1
0
2
Previous
Skip
Next
Question # 10
The benefit of using enumeration data types in a program is
Choose an answer
Program becomes shorter
Program becomes longer
Program is easy to understand
Program become complex
Previous
Skip
Next
Question # 11
"c" is called.
Choose an answer
Actual parameter
Local variable
Formal parameter
Global variable
Previous
Skip
Next
Question # 12
Malloc ( ) function return pointer to.
Choose an answer
Integer
Void
Character
Structure
Previous
Skip
Next
Question # 13
Which of the following is a LOOP statement of a C language.
Choose an answer
Repeat until
For
While -Do
Do-while
Both b and d above
Previous
Skip
Next
Question # 14
How many characters can is string hold when declared as char name [20];?
Choose an answer
18
19
20
21
Previous
Skip
Next
Question # 15
The size of an int must be greater than or equal to that of a
Choose an answer
Long int
Short int
Float
Char
Previous
Skip
Next
Question # 16
The getchar () library function
Choose an answer
Returns a character when any key is pressed
Return multiple characters when the keys are pressed
Return multiple characters when the key are pressed followed by enter key
Return a single character when the keys are passed followed by enter key
Previous
Skip
Next
Question # 17
Which of the following is a not a keyword in C langauge.
Choose an answer
Void
Volatile
Short
Gatchar
Previous
Skip
Next
Question # 18
When function is recursively called all the automatic variable are stored in a.
Choose an answer
Stack
Array
Register
Linked list
Previous
Skip
Next
Question # 19
What's wrong in the following statement provide K is a variable of type Int.
(k=2 , k <= 12, k++)
Choose an answer
The increment should always be ++k
The variable must always be the letter i when using a for loop
The variable k can't be initialized
The commas should be semicolons.
Previous
Skip
Next
Question # 20
Which of the following operators has right to left associativity.
Choose an answer
++
--
+ =
All a ,b and c above
Previous
Skip
Next
Question # 21
What is the output of the above program.
Choose an answer
5
8
Runtime error
Syntax error
Previous
Skip
Next
Back