C Language Exam 1
40 Questions I 1046 Attempts I Created By sudha_test 1229 days ago| Q.1) |
Identify the loop construct: |
| A. |
| B. |
| C. |
| D. |
| Q.2) |
Which of the following is not a storage class |
| A. |
| B. |
| C. |
| D. |
| Q.3) |
Which of the following is a correct way of defining a symbolic constant pie in C |
| A. |
| B. |
| C. |
| D. |
| Q.4) |
The minimum number of times the for loop is executed is |
| A. |
| B. |
| C. |
| D. |
| Q.5) |
In switch statement |
| A. |
| B. |
| C. |
| D. |
| Q.6) |
How many while statements are possible in do.... While loop? |
| A. |
| B. |
| C. |
| D. |
| Q.7) |
The storage area for register variables |
| A. |
| B. |
| C. |
| D. |
| Q.8) |
Which of the following statements is false |
| A. |
| B. |
| C. |
| D. |
| Q.9) |
Consider the segment If(1) printf(“yes”); else printf(“no”); what will be the output |
| A. |
| B. |
| C. |
| D. |
| Q.10) |
The global variable can be declared |
| A. |
| B. |
| C. |
| D. |
| Q.11) |
Which of the following is not correct |
| A. |
| B. |
| C. |
| D. |
| Q.12) |
printf (“ \ “ well done\” ”); what will be the output of this statement |
| A. |
| B. |
| C. |
| D. |
| Q.13) |
What is the output of the following program main() { static int y;printf (“%d \n”, y);} |
| A. |
| B. |
| C. |
| D. |
| Q.14) |
The number of elements in array declaration |
| A. |
| B. |
| C. |
| D. |
| Q.15) |
In C every variable has |
| A. |
| B. |
| C. |
| D. |
| Q.16) |
All the elements in the array must be |
| A. |
| B. |
| C. |
| D. |
| Q.17) |
How many bytes will be allotted for the declaration int num[4] [3] |
| A. |
| B. |
| C. |
| D. |
| Q.18) |
If statement is a —————statement |
| A. |
| B. |
| C. |
| D. |
| Q.19) |
The total memory required for an array |
| A. |
| B. |
| C. |
| D. |
| Q.20) |
int table [2][3] = {{0}, {0}} in this statement |
| A. |
| B. |
| C. |
| D. |
| Q.21) |
The statements that prints out the character set from A-Z is, where a is an integer variable |
| A. |
| B. |
| C. |
| D. |
| Q.22) |
The amount of storage required for holding elements of the array depends on |
| A. |
| B. |
| C. |
| D. |
| Q.23) |
If we don’t initialize a static array, what will be the elements set to: |
| A. |
| B. |
| C. |
| D. |
| Q.24) |
What is wrong with the following program main() { char m1[9]= “message1”; char m2[9]=“message2”; m2=m1;printf(“msg is %s”,m2); } |
| A. |
| B. |
| C. |
| D. |
| Q.25) |
Array subscripts in ‘C’ always start at |
| A. |
| B. |
| C. |
| D. |
| Q.26) |
The maximum number of dimension an array can have in C language is |
| A. |
| B. |
| C. |
| D. |
| Q.27) |
What is the result of the expression ( 10/3 )*3+5%3 ? |
| A. |
| B. |
| C. |
| D. |
| Q.28) |
Output of the below program #include <stdio.h>main() { int a,b=0;int c[10]= {1,2,3,4,5,6,7,8,9,0 };for(a=0;a <10;++a)b+=c[a]; printf(“%d”,b); } |
| A. |
| B. |
| C. |
| D. |
| Q.29) |
consider the array definition int num [10] = { 3 ,3 ,3 };pick the correct answers |
| A. |
| B. |
| C. |
| D. |
| Q.30) |
Which of the follwing is a string |
| A. |
| B. |
| C. |
| D. |
| Q.31) |
Give the output of the following program: #include < stdio.h >main() { int I=1;while ( I < 5){ printf(“%d”, I);}} /* End of Main */ |
| A. |
| B. |
| C. |
| D. |
| Q.32) |
How would you copy the name “Hello” to a character array (i.e. string) declared as char str[10]; |
| A. |
| B. |
| C. |
| D. |
| Q.33) |
count=0; for ( I=0;I <=10; I++){ if(I%2==0)count++; } printf(“%d”, count);Pick out the correct value for count |
| A. |
| B. |
| C. |
| D. |
| Q.34) |
What will happen if you try to put so many values into an array during the initalization such that its size is exceeded |
| A. |
| B. |
| C. |
| D. |
| Q.35) |
Compute the result of the following expression in ‘C’. A=3*4/5+10/5+8-1+7/8 |
| A. |
| B. |
| C. |
| D. |
| Q.36) |
Which of the following statements would read a single character from the keyboard and place the result in a character variable ‘ch’ defined as: char ch; |
| A. |
| B. |
| C. |
| D. |
| Q.37) |
What is the output of the following module sum=0; I=0; do { sum+=I;I++; } while(I<=5);printf(“%d”, sum); |
| A. |
| B. |
| C. |
| D. |
| Q.38) |
The value within the [] brackets in an array declaration specifies |
| A. |
| B. |
| C. |
| D. |
| Q.39) |
Dynamic memory allocation in array results in |
| A. |
| B. |
| C. |
| D. |
| Q.40) |
main() { char name[5];scanf(“%s”,name); printf(“%s”, name); } if Program is the given as input, what will be the o/p of the program; |
| A. |
| B. |
| C. |
| D. |
Take this quiz by clicking Start button on top.
Related Topics
More Quizzes by sudha_test
- Oracle_test4
- Fundamental C Test1
- Oracle_Test6
- Fundamental C Test2
- Oracle Test2
- Oracle Test1
- Grand Test SQL
- Oracle_Test7
- DBMS Test1
- Data Modeling Test1
- DBMS Sample Test2
- UML Test1
- 1z0-007 Practice Test
- PL/SQL Grand Test
- ISTQB Foundation Exam

