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
The function used to position the file pointer in C is
Choose an answer
Fseekg ()
Seekg()
Fseek()
Seekf()
Previous
Skip
Next
Question # 2
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 # 3
What is the only function all C program must contain.
Choose an answer
Start ()
System ()
Main ()
Program ()
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
Which of the following is a not a keyword in C langauge.
Choose an answer
Void
Volatile
Short
Gatchar
Previous
Skip
Next
Question # 6
Function have
Choose an answer
Local scope
Block scope
File scope
Function scope
Previous
Skip
Next
Question # 7
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 # 8
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 # 9
Which is the following is not a storage class in C.
Choose an answer
Auto
Struct
Extern
Static
Previous
Skip
Next
Question # 10
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 # 11
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 # 12
Which command is used to skip the rest of a loop and carry on from the top of the loop again.
Choose an answer
Break
Resume
Continue
Skip
Previous
Skip
Next
Question # 13
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 # 14
C program language vas developed by.
Choose an answer
Dennis Ritchie
Ken thompson
Bill Gates
Peter Norton
Previous
Skip
Next
Question # 15
A parameters in a function definition are known as.
Choose an answer
Actual parameters
Formal parameters
Dummy parameters
Optional parameters
Previous
Skip
Next
Question # 16
Which of the following is a not a keyword of C langauge.
Choose an answer
Void
Volatile
Getchar
Short
Previous
Skip
Next
Question # 17
What is the reslutl of the expression 6+12*3 -4/2?
Choose an answer
22
25
40
45
Previous
Skip
Next
Question # 18
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 # 19
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
Question # 20
Which of the following is not a character constant.
Choose an answer
'\60
'/x 24'
'sum'
'A'
Previous
Skip
Next
Question # 21
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
Back