PPSC Computer Science Full Book test With Answers

PPSC Computer Science Full Book test

Sr. # Questions Answers Choice
1 C program language vas developed by. Dennis Ritchie Ken thompson Bill Gates Peter Norton
2 An example of a value parameter is the code above is. x y c foo
3 The function 'foo' returns the following type as result. Ineger No result is returned Float Double
4 The declaration "void foo (int, x int & y)" is called a Function body Function type Function stereotype Function prototype
5 "c" is called. Actual parameter Local variable Formal parameter Global variable
6 "x" and "y" are called Actual parameters Local variables Formal parameters Global variables
7 The arguments in main () function are known as. Program parameter Command line arguments Both a and b above None of these
8 To read the formatted input data from a file, which of the following function is used. Getchar () fgets() fscanf () scanf()
9 The declaration int (*a)[8] : is An array of pointers A pointer to an array A pointer to a function Function returning pointer
10 int *p[5] ; is used for Fixed row size and varying column size Fixed row size and fixed column size Varying row size and varying column size. For storing integers
11 The function used to position the file pointer in C is Fseekg () Seekg() Fseek() Seekf()
12 A parameters in a function definition are known as. Actual parameters Formal parameters Dummy parameters Optional parameters
13 The address of the starting element of an array is. 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
14 Identify the correct statement from the following statements. Typedef int integer Typedef int integer; Typedef int = integer : Typedef integer int ;
15 If suppose a variable 'a' is initialized as int a = oxff, then what will be output for the below code.
(a << 4>>12)? printf ("Humaira') printf (" iram")
Syntax Error 1 10 100
16 How many number of tokens are there in the following statement provided 'valeus' is an integer variable.
if value == 21)
3 4 5 6
17 In the statement # define , the symbol # must commence from Any where in any line <div>First character of that line</div> Any where out side of main () always. None of above
18 Which of the following is not a character constant. '\60 '/x 24' 'sum' 'A'
19 The function sprint ( ) works like print f ( ) , but operates on. Strings Data in a file Stderr Stdin
20 The function slower checks wither a character is in lowered case or not and hence it should return. The character in lower case The character itself Nothing 0 or 1
21 While working with the binary Strems for 'C' I/O file operations. 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
22 With the following declaration , the correct answer is.enum rgb (red = -1, green , blue) red = -1, green = -2, blue = -3 red = -1 , green = 0 blue = 1 red = -1 , green = 2 blue = 3 All above alternative are illegal declarations.
23 Which of the following operators has right to left associativity. ++ -- + = All a ,b and c above
24 If a = Oxaa and b = a << 1 then b = 2a b = a/2 a = b -1 b = a
25 The getchar () library function 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
26 The given statement of FILE * fptr, 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
27 While declaring an array in C as datatype array name [size] the size can be. Any constant An integer constant Any variable Any initialized integer variable
28 What is the meaning of self referential structure. Array of structure Single structure Structure calling it's parent structure. Structure calling another structure.
29 How is a variable accessed from another file. The global variable is reference via the extern specifier The global variable is referenced via the auto specifier The global variable is referenced via the global specifier None of above
30 What does the "auto" specifier do. 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
Download This Set

Is this page helpful?