
Instruction:
- This is a FREE online test. DO NOT pay money to anyone to attend this test.
- Total number of questions : 20.
- Time alloted : 20 minutes.
- Each question carry 1 mark, no negative marks.
- DO NOT refresh the page.
- All the best :-).
1. | What will be the output of the program?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Learn more problems on : Control Instructions Discuss about this problem : Discuss in Forum |
2. | Which of the following is the correct order of evaluation for the below expression? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: C uses left associativity for evaluating expressions to break a tie between two operators having same precedence. Learn more problems on : Expressions Discuss about this problem : Discuss in Forum |
3. | Which of the following range is a valid long double (Turbo C in 16 bit DOS OS) ? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: The range of long double is 3.4E-4932 to 1.1E+4932 Learn more problems on : Floating Point Issues Discuss about this problem : Discuss in Forum |
4. | Will the printf() statement print the same values for any values of a?
|
|||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Learn more problems on : Floating Point Issues Discuss about this problem : Discuss in Forum |
5. | What will be the output of the program?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: Step 1: int i=0; The variable i is declared as in integer type and initialized to '0'(zero). Step 2: i++; Here variable i is increemented by 1. Hence i becomes '1'(one). Step 3: if(i<=5) becomes if(1 <=5). Hence the if condition is satisfied and it enter into if block statements. Step 4: printf("IndiaBIX"); It prints "IndiaBIX". Step 5: exit(1); This exit statement terminates the program execution. Hence the output is "IndiaBIx". Learn more problems on : Functions Discuss about this problem : Discuss in Forum |
6. | What will be the output of the program ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Learn more problems on : Pointers Discuss about this problem : Discuss in Forum |
7. | What will be the output of the program if the array begins 1200 in memory?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: Step 1: int arr[]={2, 3, 4, 1, 6}; The variable arr is declared as an integer array and initialized. Step 2: printf("%u, %u, %u\n", arr, &arr[0], &arr); Here, The base address of the array is 1200. => arr, &arr is pointing to the base address of the array arr. => &arr[0] is pointing to the address of the first element array arr. (ie. base address) Hence the output of the program is 1200, 1200, 1200 Learn more problems on : Arrays Discuss about this problem : Discuss in Forum |
8. | Which of the following is correct way to define the function fun() in the below program?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: void fun(int p[][4]){ } is the correct way to write the function fun(). while the others are considered only the function fun() is called by using call by reference. Learn more problems on : Arrays Discuss about this problem : Discuss in Forum |
9. | What will be the output of the program ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: printf(5+"IndiaBIX\n"); In the printf statement, it skips the first 5 characters and it prints "BIX" Learn more problems on : Strings Discuss about this problem : Discuss in Forum |
10. | What will be the output of the program ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Learn more problems on : Structures, Unions, Enums Discuss about this problem : Discuss in Forum |
11. | Point out the error in the program?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: The structure emp contains a member e of the same type.(i.e) struct emp. At this stage compiler does not know the size of sttructure. Learn more problems on : Structures, Unions, Enums Discuss about this problem : Discuss in Forum |
12. | What will be the output of the program ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: The program will generate infinite loop. When an EOF is encountered fgetc() returns EOF. Instead of checking the condition for EOF we have checked it for NULL. so the program will generate infinite loop. Learn more problems on : Input / Output Discuss about this problem : Discuss in Forum |
13. | While calling the fprintf() function in the format string conversion specifier %s can be used to write a character string in capital letters. |
|||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: The %s format specifier tells the compiler the given input was string of characters. Learn more problems on : Input / Output Discuss about this problem : Discuss in Forum |
14. | The maximum combined length of the command-line arguments including the spaces between adjacent arguments is |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Learn more problems on : Command Line Arguments Discuss about this problem : Discuss in Forum |
15. | Which of the following statements are correct about the program?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Learn more problems on : Bitwise Operators Discuss about this problem : Discuss in Forum |
16. | What will be the output of the program?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: Step 1: const c = -11; The constant variable 'c' is declared and initialized to value "-11". Step 2: const int d = 34; The constant variable 'd' is declared as an integer and initialized to value '34'. Step 3: printf("%d, %d\n", c, d); The value of the variable 'c' and 'd' are printed. Hence the output of the program is -11, 34 Learn more problems on : Const Discuss about this problem : Discuss in Forum |
17. | Point out the correct statement will let you access the elements of the array using 'p' in the following program?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Learn more problems on : Memory Allocation Discuss about this problem : Discuss in Forum |
18. | What do the following declaration signify?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Learn more problems on : Complicated Declarations Discuss about this problem : Discuss in Forum |
19. | Point out the error in the following program.
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation:
Declaration:
With memccpy(), the copying stops as soon as either of the following occurs: Learn more problems on : Library Functions Discuss about this problem : Discuss in Forum |
20. | Point out the error in the following program.
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Learn more problems on : Library Functions Discuss about this problem : Discuss in Forum |