PPSC Computer Science Chapter 8 C Programming Online Test With Answers

PPSC Computer Science Chapter 8 C Programming Online Test

Sr. # Questions Answers Choice
1 Which of the following is "stringzizing operator"? $ % # ?
2 Which of the following functions are used in unformatted data files. Fscanf Fwrite Fread fscanf & fwrite
3 Write the last element of the following array.
Char flag [] =" FALSE"
E e /O \O
4 If you declare an array without stating the elements it will be set to A null value Zero Garbage value Set of words
5 In mixed mode expressions. Operands of lower type get automatically converted to higher type Operands of higher type get automatically converted to lower type. Operands of higher and lower type get in there changed Operands of lower type get automatically converted to lower type.
6 The storage class of a local variable is Auto Static Extern Register
7 Which of the following is an advantage of using macros over functions. Functions must have parameters, macros do not The code associated with a function is expanded in line Values passed to function must be of specific data type The code associated with a function is not expanded in line.
8 Multiple macro can be defined by placing _____ at teh end of each line except the last. / \ # $
9 The getchar ()function reads a String from a file Character from a file String from the key board Character from the keyboard
10 A function protoype is A definition of the function a declaration statement in the called program A declaration statement in the called program A function call in the program
11 The header file contains the function prototypes to the standard input /output library functions and information used by them. <std I/O .h> <stdio .h> < stdib.h> <studio.h>
12 How many characters can is string hold when declared as char name [20];? 18 19 20 21
13 What is the reslutl of the expression 6+12*3 -4/2? 22 25 40 45
14 The benefit of using enumeration data types in a program is Program becomes shorter Program becomes longer Program is easy to understand Program become complex
15 When a program is running the value of a constant Can be changed Cannot be used I always hidden Cannot be changed
16 C program language vas developed by. Dennis Ritchie Ken thompson Bill Gates Peter Norton
17 An example of a value parameter is the code above is. x y c foo
18 The function 'foo' returns the following type as result. Ineger No result is returned Float Double
19 The declaration "void foo (int, x int & y)" is called a Function body Function type Function stereotype Function prototype
20 "c" is called. Actual parameter Local variable Formal parameter Global variable
Download This Set

Is this page helpful?