C Programming What's wrong in the following statement, provided k is a variable of type int?for(k = 2, k <=12, k++) The commas should be semicolons. The variable must always be the letter i when using a for loop. The increment should always be ++k . There should be a semicolon at the end of the statement. The variable k can’t be initialized. The commas should be semicolons. The variable must always be the letter i when using a for loop. The increment should always be ++k . There should be a semicolon at the end of the statement. The variable k can’t be initialized. ANSWER DOWNLOAD EXAMIANS APP
C Programming What is the right choice, if the following loop is implemented?void main(){ int num = 0; do{ --num; printf("%d", num); }while( ++num >= 0 );} There will be a compilation error reported. A run time error will be generated. Prints the value of 0 one time only. The program will not enter into the loop. The loop will run infinitely many times. There will be a compilation error reported. A run time error will be generated. Prints the value of 0 one time only. The program will not enter into the loop. The loop will run infinitely many times. ANSWER DOWNLOAD EXAMIANS APP
C Programming In which stage the following code#includegets replaced by the contents of the file stdio.h During Editing During linking During Execution None of these During Preprocessing During Editing During linking During Execution None of these During Preprocessing ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be printed after compiling and running the following code?main() { char *p; printf("%d %d",sizeof(*p), sizeof(p));} 2 1 2 2 1 1 1 2 2 1 2 2 1 1 1 2 ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine Output:void main(){ char *p; p="%dn"; p++; p++; printf(p-2, 300);} None of These 300 Error %d\n None of These 300 Error %d\n ANSWER DOWNLOAD EXAMIANS APP
C Programming Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ? rem = modf(3.14, 2.1); Remainder cannot be obtain in floating point division. rem = 3.14 % 2.1; rem = fmod(3.14, 2.1); rem = modf(3.14, 2.1); Remainder cannot be obtain in floating point division. rem = 3.14 % 2.1; rem = fmod(3.14, 2.1); ANSWER DOWNLOAD EXAMIANS APP