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 would you declared constant of 5 called 'MYCONST"?
Choose an answer
Constant MYCONST =5
Int my const =5
# define MYCONST 5
#define MYCONST =5
Previous
Skip
Next
Question # 2
Which is the following is not a storage class in C.
Choose an answer
Auto
Struct
Extern
Static
Previous
Skip
Next
Question # 3
Which of the following is not a correct variable type.
Choose an answer
Float
Real
Int
Double
Previous
Skip
Next
Question # 4
Every C program consists of _____________ functions.
Choose an answer
Only one
Only two
One or many
None of the above
Previous
Skip
Next
Question # 5
To most widely used method for interpreting the bit setting as non negative integer is.
Choose an answer
EBCD system
BCD system
ASCII system
Binary number system
Previous
Skip
Next
Question # 6
What is the fifth element of the array
Int a [3][4] ={1,2,3,4,5,6,7,8,9,10,11}
Choose an answer
4
5
6
7
Previous
Skip
Next
Question # 7
Function have
Choose an answer
Local scope
Block scope
File scope
Function scope
Previous
Skip
Next
Question # 8
What does the "auto" specifier do.
Choose an answer
It automatically initializes a variables to 0
It indicates that a variables memory will automatically be preserved
It automatically increments the variable when used.
It automatically initializes a variable to NULL
Previous
Skip
Next
Question # 9
C program language vas developed by.
Choose an answer
Dennis Ritchie
Ken thompson
Bill Gates
Peter Norton
Previous
Skip
Next
Question # 10
While declaring an array in C as datatype array name [size] the size can be.
Choose an answer
Any constant
An integer constant
Any variable
Any initialized integer variable
Previous
Skip
Next
Question # 11
What is the reslutl of the expression 6+12*3 -4/2?
Choose an answer
22
25
40
45
Previous
Skip
Next
Question # 12
How many characters can is string hold when declared as char name [20];?
Choose an answer
18
19
20
21
Previous
Skip
Next
Question # 13
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 # 14
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 # 15
Information will be passed to the function via special identifier is called.
Choose an answer
Arguments
Parameters
Both A and B above
Elements
Previous
Skip
Next
Question # 16
The storage class of a local variable is
Choose an answer
Auto
Static
Extern
Register
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
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 # 19
Which of the following is a not a keyword in C langauge.
Choose an answer
Void
Volatile
Short
Gatchar
Previous
Skip
Next
Question # 20
The associativity of ++ operator is
Choose an answer
For arithmetic expression and
For pointer expression
For pointer expression and
For pointer express in and
Previous
Skip
Next
Question # 21
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
Back