C Programming What will be the value of sum after the following program is executed?void main(){ int sum=1, index = 9; do{ index = index – 1; sum *= 2; }while( index > 9 );} 0.25 2 0.5 1 9 0.25 2 0.5 1 9 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); rem = fmod(3.14, 2.1); Remainder cannot be obtain in floating point division. rem = 3.14 % 2.1; rem = modf(3.14, 2.1); rem = fmod(3.14, 2.1); Remainder cannot be obtain in floating point division. rem = 3.14 % 2.1; ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine Output:#include#define a 10void main(){ #define a 50 printf("%d", a);} Compiler Error 50 10 None of These Compiler Error 50 10 None of These ANSWER DOWNLOAD EXAMIANS APP
C Programming char *ptr;char myString[] = "abcdefg";ptr = myString;ptr += 5;what string does ptr point to in the sample code above? fg defg bcdefg cdefg efg fg defg bcdefg cdefg efg ANSWER DOWNLOAD EXAMIANS APP
C Programming Find the output of the following program.void main(){ int array[10]; int *i = &array[2], *j = &array[5]; int diff = j-i; printf("%d", diff);} 3 Garbage value 6 Error 3 Garbage value 6 Error 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));} 1 2 1 1 2 2 2 1 1 2 1 1 2 2 2 1 ANSWER DOWNLOAD EXAMIANS APP