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 a not a keyword of C langauge.
Choose an answer
Void
Volatile
Getchar
Short
Previous
Skip
Next
Question # 2
The function sprint ( ) works like print f ( ) , but operates on.
Choose an answer
Strings
Data in a file
Stderr
Stdin
Previous
Skip
Next
Question # 3
Suppose the return type of function f is void. Which one of the following statements is true.
Choose an answer
Function f does not contain a return statement.
Function f does not have parameters
Function f return a generic value
Function f does not work correctly
Previous
Skip
Next
Question # 4
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 # 5
What is the reslutl of the expression 6+12*3 -4/2?
Choose an answer
22
25
40
45
Previous
Skip
Next
Question # 6
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 # 7
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 # 8
Which one of the following will declare a pointer to an integer at address 0 x 200 in memory.
Choose an answer
int " x, " x = 0 x 200;
int " x, = & 0 x 200;
int " x, = "0 x 200;
int " x, = 0 x 200
Previous
Skip
Next
Question # 9
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 # 10
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
Question # 11
The given statement FILE "fptr;
Choose an answer
Defines a pointer to the pre defined structure type FILE.
Defines a pointer to the usere defined structure type FILE
Defines a pointer to the pre-defined data type FILE DESCRIPTOR.
Creates a file pointed by fptr
Previous
Skip
Next
Question # 12
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 # 13
The arguments in main () function are known as.
Choose an answer
Program parameter
Command line arguments
Both a and b above
None of these
Previous
Skip
Next
Question # 14
Which of the following is "stringzizing operator"?
Choose an answer
$
%
#
?
Previous
Skip
Next
Question # 15
C program language vas developed by.
Choose an answer
Dennis Ritchie
Ken thompson
Bill Gates
Peter Norton
Previous
Skip
Next
Question # 16
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 # 17
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 # 18
What is the meaning of self referential structure.
Choose an answer
Array of structure
Single structure
Structure calling it's parent structure.
Structure calling another structure.
Previous
Skip
Next
Question # 19
Which is the following is not a storage class in C.
Choose an answer
Auto
Struct
Extern
Static
Previous
Skip
Next
Question # 20
Which of the following is a not a keyword in C langauge.
Choose an answer
Void
Volatile
Short
Gatchar
Previous
Skip
Next
Question # 21
Write the last element of the following array.
Char flag [] =" FALSE"
Choose an answer
E
e
/O
\O
Previous
Skip
Next
Back