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 address of the starting element of an array is.
Choose an answer
Represented by subscripted variable of the starting element.
Represented by the array name
Not used by the compiler
Represented by the size of the array
Previous
Skip
Next
Question # 2
How many characters can is string hold when declared as char name [20];?
Choose an answer
18
19
20
21
Previous
Skip
Next
Question # 3
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 # 4
The function 'foo' returns the following type as result.
Choose an answer
Ineger
No result is returned
Float
Double
Previous
Skip
Next
Question # 5
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 # 6
The size of an int must be greater than or equal to that of a
Choose an answer
Long int
Short int
Float
Char
Previous
Skip
Next
Question # 7
A parameters in a function definition are known as.
Choose an answer
Actual parameters
Formal parameters
Dummy parameters
Optional parameters
Previous
Skip
Next
Question # 8
The function used to position the file pointer in C is
Choose an answer
Fseekg ()
Seekg()
Fseek()
Seekf()
Previous
Skip
Next
Question # 9
Which of the following is not a valid name for a C variable.
Choose an answer
Hairaj
Hello _ raj
Hello raj
None of above
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
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 # 12
Which of the following is a not a keyword of C langauge.
Choose an answer
Void
Volatile
Getchar
Short
Previous
Skip
Next
Question # 13
How would you declared constant of 5 called 'MYCONST"?
Choose an answer
Constant MYCONST =5
Int my const =5
# define MYCONST 5
#define MYCONST =5
Previous
Skip
Next
Question # 14
The function sprint ( ) works like print f ( ) , but operates on.
Choose an answer
Strings
Data in a file
Stderr
Stdin
Previous
Skip
Next
Question # 15
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 # 16
When a program is running the value of a constant
Choose an answer
Can be changed
Cannot be used
I always hidden
Cannot be changed
Previous
Skip
Next
Question # 17
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 # 18
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 # 19
Which is the following is not a storage class in C.
Choose an answer
Auto
Struct
Extern
Static
Previous
Skip
Next
Question # 20
The number of arguments for realloc ( ) function is.
Choose an answer
0
1
2
3
Previous
Skip
Next
Question # 21
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
Back