What is wrong with this code for macro? #define doSomething ( x , y ) x + y // this macro adds the two parameters together int m = doSomething( 10, 30 );
Which of the following printf statements print out the memor…
Which of the following printf statements print out the memory address that the pointer variable ptr is point at?
What is the output of the following code? #includeint test(i…
What is the output of the following code? #includeint test(int);int main(int argc, char* argv[]){ int k=35; k = test(k=test(k=test(k))); printf(“k=%d\n”, k); return 0;}int test(int k){ return k++;}
Which of the following is a valid and complete function defi…
Which of the following is a valid and complete function definition?
Assume you have a FILE pointer named ptr which is pointing t…
Assume you have a FILE pointer named ptr which is pointing to an opened file. Which of the following statements is the correct way to read in a string?
After we open a file with fopen(), what we should do before…
After we open a file with fopen(), what we should do before writing things to the file?
What is the output of this code? #define VALUE 10; int mai…
What is the output of this code? #define VALUE 10; int main( int argc, char* argv[] ) { int x = VALUE * 2; printf( “%d”, x ); return 0; }
What is the output of the following code? #includeint functi…
What is the output of the following code? #includeint function(int, int);int main(int argc, char* argv[]){ int a = 25, b = 24 + 1, c; printf(“%d”, function(a, b)); return 0;}int function(int x, int y){ return (x – (x == y));}
Given this macro: #define doSomething( x, y ) ( 2 * x – y )…
Given this macro: #define doSomething( x, y ) ( 2 * x – y ) What is the value of result after this code? int result = doSomething( 3, 2 );
What is the output of the following code? #include int fun(i…
What is the output of the following code? #include int fun(int *num){ return (*num)–;}int main(int argc, char* argv[]){ int num = 16; for(fun(&num); fun(&num); fun(&num)) printf(“%d “, fun(&num)); return 0;}