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 What is the associatively of the conditional operator. Left to Right Right to left Top to bottom None of the above
2 Information will be passed to the function via special identifier is called. Arguments Parameters Both A and B above Elements
3 What is the output of the following program.
#include <studio. h>
int c [10]={1,2,3,4,5,6,7,8,9,10}
main ()
{int a, b =0:
for {a<10;++a)
if c[a]:
[romt f (%d" . n);}

20 24 25 30
4 What is the fifth element of the array
Int a [3][4] ={1,2,3,4,5,6,7,8,9,10,11}
4 5 6 7
5 Which is the following is not a storage class in C. Auto Struct Extern Static
6 How would you declared constant of 5 called 'MYCONST"? Constant MYCONST =5 Int my const =5 # define MYCONST 5 #define MYCONST =5
7 Which command is used to skip the rest of a loop and carry on from the top of the loop again. Break Resume Continue Skip
8 Suppose the return type of function f is void. Which one of the following statements is true. 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
9 Which of the following is a not a keyword of C langauge. Void Volatile Getchar Short
10 Which of the following correctly access the seventh element stored in foo, an array with 100 elements. foo{6}: Foo {7}: Foo Foo():
11 Which of the following is not a correct variable type. Float Real Int Double
12 What is the only function all C program must contain. Start () System () Main () <sup>Program ()</sup>
13 What is the correct value to return to the operating system upon the successful completion of a program 1 1 0 2
14 Every C program consists of _____________ functions. Only one Only two One or many None of the above
Download This Set

Is this page helpful?