What's wrong in the following statement, provided k is a variable of type int?for(k = 2, k <=12, k++) The variable k can’t be initialized. The increment should always be ++k . The variable must always be the letter i when using a for loop. There should be a semicolon at the end of the statement. The commas should be semicolons. TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ char string[]="Hello World"; display(string);}void display(char *string){ printf("%s", string);} Compiler Error will print Hello World Can't Say None of These TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the program if the array begins at address 65486?#includevoid main(){ int arr[] = {12, 14, 15, 23, 45}; printf("%u, %u", arr, &arr);} 65486, 65486 65486, 65488 65486, 65487 None of these 65486, 65490 TRUE ANSWER : ? YOUR ANSWER : ?
In which stage the following code#include<stdio.h>gets replaced by the contents of the file stdio.h During Preprocessing During Editing During linking None of these During Execution TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the program?#include<stdio.h>#define int char void main(){ int i = 65; printf("sizeof(i)=%d", sizeof(i));} None of These Compiler Error sizeof(i)=2 sizeof(i)=1 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the given program?#include<stdio.h>void main(){ int i=10; printf("i=%d", i); { int i=20; printf("i=%d", i); i++; printf("i=%d", i); } printf("i=%d", i);} 10 20 21 20 10 20 21 10 10 20 21 21 10 10 11 11 TRUE ANSWER : ? YOUR ANSWER : ?
The type of the controlling expression of a switch statement cannot be of the type ........ short float char int long TRUE ANSWER : ? YOUR ANSWER : ?
Determine Output:void main(){ int i=1, j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; }} Compiler Error GOOD BAD GOOD None of These TRUE ANSWER : ? YOUR ANSWER : ?
Functions have .......... Local scope Function scope No scope at all Block scope File scope TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following is the correct way of declaring a float pointer: *float ptr; float *ptr; float ptr; None of these TRUE ANSWER : ? YOUR ANSWER : ?