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
Which of the following is not a character constant.
Choose an answer
'\60
'/x 24'
'sum'
'A'
Previous
Skip
Next
Question # 2
Which of the following operators has right to left associativity.
Choose an answer
++
--
+ =
All a ,b and c above
Previous
Skip
Next
Question # 3
Multiple macro can be defined by placing _____ at teh end of each line except the last.
Choose an answer
/
\
#
$
Previous
Skip
Next
Question # 4
Find teh output of the following program
void main (){
int i = ' hello";
print f (i):
}
Choose an answer
Syntax error
Runtime error
h
Hello
Previous
Skip
Next
Question # 5
Element of the array are accessed by
Choose an answer
Index
Mathematical function
Accessing the function in built in data structure.
Int l;
Previous
Skip
Next
Question # 6
The declaration int (*a)[8] : is
Choose an answer
An array of pointers
A pointer to an array
A pointer to a function
Function returning pointer
Previous
Skip
Next
Question # 7
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 # 8
Which is the following is not a storage class in C.
Choose an answer
Auto
Struct
Extern
Static
Previous
Skip
Next
Question # 9
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 # 10
'C' is a middle level language because.
Choose an answer
It is evolved in Middle age of computer development.
Not having so many features but still is robust
Easier to learn and use
Combines the best features of high low level languages.
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
If a = Oxaa and b = a << 1 then
Choose an answer
b = 2a
b = a/2
a = b -1
b = a
Previous
Skip
Next
Question # 13
The given statement of FILE * fptr,
Choose an answer
Defines a pointer to the pre defined structure type FILE
Define a pointer to the user defined structure type FILE.
define a pointer to the pre defined data type FILE DESCRIPTOR
Creates a file pointed by fptr
Previous
Skip
Next
Question # 14
What's wrong in the statement ? (x == 4 && y == 5) ? (a=5):(b=6):
Choose an answer
None of abvoe
The question mark should be an equal sign.
The first semicolon should be a colon
There are too many variables in the statement
Previous
Skip
Next
Question # 15
What is the only function all C program must contain.
Choose an answer
Start ()
System ()
Main ()
Program ()
Previous
Skip
Next
Question # 16
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 # 17
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 # 18
The function used to position the file pointer in C is
Choose an answer
Fseekg ()
Seekg()
Fseek()
Seekf()
Previous
Skip
Next
Question # 19
How is a variable accessed from another file.
Choose an answer
The global variable is reference via the extern specifier
The global variable is referenced via the auto specifier
The global variable is referenced via the global specifier
None of above
Previous
Skip
Next
Question # 20
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 # 21
A parameters in a function definition are known as.
Choose an answer
Actual parameters
Formal parameters
Dummy parameters
Optional parameters
Previous
Skip
Next
Back