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
What is the reslutl of the expression 6+12*3 -4/2?
Choose an answer
22
25
40
45
Previous
Skip
Next
Question # 2
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 # 3
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 # 4
The function fprint is used in the program.
Choose an answer
When too + many print calls have been used in the program.
In place of printf , as it uses more memory
When the type of the variables to be printed are not known
When the output is to be printed on to a file
Previous
Skip
Next
Question # 5
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 # 6
What is the difference between a declaration and a definition of a variable.
Choose an answer
Both can occur multiple times but a declaration must occur first.
There is no difference between them
A declaration occurs once but a definition may occur many times.
Both can occur multiple times but a definition must occur first.
Previous
Skip
Next
Question # 7
Which of the following is an advantage of using macros over functions.
Choose an answer
Functions must have parameters, macros do not
The code associated with a function is expanded in line
Values passed to function must be of specific data type
The code associated with a function is not expanded in line.
Previous
Skip
Next
Question # 8
The function 'foo' returns the following type as result.
Choose an answer
Ineger
No result is returned
Float
Double
Previous
Skip
Next
Question # 9
Which of the following is "stringzizing operator"?
Choose an answer
$
%
#
?
Previous
Skip
Next
Question # 10
String concatenating means.
Choose an answer
Combining two strings.
Extracting a substring out of a string.
Merging two strings.
Comparing the two string to define the larger one.
Previous
Skip
Next
Question # 11
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 # 12
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 # 13
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 # 14
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 # 15
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 # 16
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 # 17
A function protoype is
Choose an answer
A definition of the function
a declaration statement in the called program
A declaration statement in the called program
A function call in the program
Previous
Skip
Next
Question # 18
The function sprint f ( ) works like print f ( ), but operates on.
Choose an answer
Data file
String
Stderr
Stdin
Previous
Skip
Next
Question # 19
The header file contains the function prototypes to the standard input /output library functions and information used by them.
Choose an answer
<std I/O .h>
<stdio .h>
< stdib.h>
<studio.h>
Previous
Skip
Next
Question # 20
'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 # 21
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
Back