Reload your browser or click the button below to continue.
Disable AdBlock Plus:
Click on the icon in yor browser toolbar.
Click the blue button next to "Block Ads On:"
Click the red "Refresh" button or click the button below to continue.
Disable Adguard AdBlocker:
Click on the icon in yor browser toolbar.
Click on the toggle next to "Protection on this website".
Reload your browser or click the button below to continue.
Disable uBlock Origin:
Click on the icon in yor browser toolbar.
Click on the big blue "power" icon.
Reload your browser or click the button below to continue.
Preprocessor exercises in C Programming in C
Program output 4: Give the output on the screen of the following program
#include <stdio.h>#define PRINT(i) printf("value = %d\n", i)int main(){Â Â Â int x = 03, y = 02 , z = 01;Â Â Â PRINT(x | y & z); Â Â Â PRINT(x | y & - z); Â Â Â PRINT(x ^ y ...
Half the input value: Write a preprocessor command that halves its input value....
Average of 5 integers: Write a preprocessor command that calculates the average of 5 integers....
Maximum of 2 integers: Write a preprocessor command that calculates the maximum of 2 integers....
Sum of 3 integers: Write a preprocessor command that calculates the sum of 3 integers....
Square of an integer: Write a preprocessor command that calculates the square of an integer....
Hello People: Write a preprocessor command that prints on the string its parameter...
Program output 7: Give the output on the screen of the following program
#include <stdio.h>
#define PRINT(format,x) printf(#x " = %"#format"\n",x)
int main(){Â Â Â int integer = 5;Â Â Â char character = '5';Â Â Â char *string = "5";Â Â Â PRINT(d, string)...
Program output 8: Give the output on the screen of the following program
#include <stdio.h>
#define PR(x) printf(#x " = %.8g\t",(double)x)#define NL putchar('\n');#define PRINT4(a,b,c,d) PR(a);PR(b);PR(c);PR(d);NL
int main(){Â Â Â double d;Â Â Â float f;Â Â...
Program output 9: Give the output on the screen of the following program
#include <stdio.h>
#define PR(x) printf(#x " = %.8g\t",(double)x)#define NL putchar('\n');#define PRINT1(a) PR(a);NL#define PRINT2(a,b) PR(a);PR(b);NL
int main(){Â Â Â double d = 3.2 , x;...
Program output 10: Give the output on the screen of the following program
#include <stdio.h>
#define PRINT(format,x) printf(#x " = %"#format"\t",x)#define NL putchar('\n');
#define PRINT1(f,x) PRINT(f,x);NL#define PRINT2(f,x1,x2) PRINT(f,x1);PRINT1(f,x2)#define...
Program output 11: Give the output on the screen of the following program
#include <stdio.h>
#define PRINT(format,x) printf(#x " = %"#format"\t",x)#define NL putchar('\n');
#define PRINT1(f,x) PRINT(f,x);NL#define PRINT2(f,x1,x2) PRINT(f,x1);PRINT1(f,x2)#define...