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
A parameters in a function definition are known as.
Choose an answer
Actual parameters
Formal parameters
Dummy parameters
Optional parameters
Previous
Skip
Next
Question # 2
In the statement # define , the symbol # must commence from
Choose an answer
Any where in any line
First character of that line
Any where out side of main () always.
None of above
Previous
Skip
Next
Question # 3
Which of the following correctly access the seventh element stored in foo, an array with 100 elements.
Choose an answer
foo{6}:
Foo {7}:
Foo
Foo():
Previous
Skip
Next
Question # 4
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 # 5
Which of the following is a not a keyword of C langauge.
Choose an answer
Void
Volatile
Getchar
Short
Previous
Skip
Next
Question # 6
Which of the following is not a correct variable type.
Choose an answer
Float
Real
Int
Double
Previous
Skip
Next
Question # 7
What is the output of the above program.
Choose an answer
5
8
Runtime error
Syntax error
Previous
Skip
Next
Question # 8
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 # 9
Which one of the following will read a character from the keyboard and will store it in the variable.
Choose an answer
c = getc ()
getc (&c)
c = getchar ()
c = getchar (stdin)
Previous
Skip
Next
Question # 10
Which of the following is "stringzizing operator"?
Choose an answer
$
%
#
?
Previous
Skip
Next
Question # 11
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 # 12
If suppose a variable 'a' is initialized as int a = oxff, then what will be output for the below code.
(a << 4>>12)? printf ("Humaira') printf (" iram")
Choose an answer
Syntax Error
1
10
100
Previous
Skip
Next
Question # 13
What is the base data type of a pointer variable by which the memory would be allocated to it.
Choose an answer
Int
Float
No data type
Unsigned int
Previous
Skip
Next
Question # 14
int *p[5] ; is used for
Choose an answer
Fixed row size and varying column size
Fixed row size and fixed column size
Varying row size and varying column size.
For storing integers
Previous
Skip
Next
Question # 15
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 # 16
Which of the following is not a character constant.
Choose an answer
'\60
'/x 24'
'sum'
'A'
Previous
Skip
Next
Question # 17
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 # 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
When a program is running the value of a constant
Choose an answer
Can be changed
Cannot be used
I always hidden
Cannot be changed
Previous
Skip
Next
Question # 20
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
Back