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 only function all C program must contain.
Choose an answer
Start ()
System ()
Main ()
Program ()
Previous
Skip
Next
Question # 2
The function used to position the file pointer in C is
Choose an answer
Fseekg ()
Seekg()
Fseek()
Seekf()
Previous
Skip
Next
Question # 3
What's wrong in the statement ? (x == 4 && y == 5) ? (a=5):(b=6):
Choose an answer
The question mark should be an equal sign.
The first semicolon should be a colon
There are too many variables in the statement
None of abvoe
Previous
Skip
Next
Question # 4
While working with the binary Strems for 'C' I/O file operations.
Choose an answer
Only the binary values can be read and can be written
No character transition take place
Character translation takes place
Both a and b above
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 a not a keyword in C langauge.
Choose an answer
Void
Volatile
Short
Gatchar
Previous
Skip
Next
Question # 7
The function slower checks wither a character is in lowered case or not and hence it should return.
Choose an answer
The character in lower case
The character itself
Nothing
0 or 1
Previous
Skip
Next
Question # 8
A function with no definition
Choose an answer
I san invalid function
Produces syntax error
Result into runtime error
Is allowed and is known as dummy function
Previous
Skip
Next
Question # 9
The function sprint f ( ) works like print f ( ), but operates on.
Choose an answer
Data file
String
Stderr
Stdin
Previous
Skip
Next
Question # 10
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 # 11
A parameters in a function definition are known as.
Choose an answer
Actual parameters
Formal parameters
Dummy parameters
Optional parameters
Previous
Skip
Next
Question # 12
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 # 13
Which of the following is not a character constant.
Choose an answer
'\60
'/x 24'
'sum'
'A'
Previous
Skip
Next
Question # 14
To read the formatted input data from a file, which of the following function is used.
Choose an answer
Getchar ()
fgets()
fscanf ()
scanf()
Previous
Skip
Next
Question # 15
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 # 16
How many number of tokens are there in the following statement provided 'valeus' is an integer variable.
if value == 21)
Choose an answer
3
4
5
6
Previous
Skip
Next
Question # 17
The getchar ()function reads a
Choose an answer
String from a file
Character from a file
String from the key board
Character from the keyboard
Previous
Skip
Next
Question # 18
What is the output of the above program.
Choose an answer
5
8
Runtime error
Syntax error
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
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 function 'foo' returns the following type as result.
Choose an answer
Ineger
No result is returned
Float
Double
Previous
Skip
Next
Back