‎#define good bad
main()
{
int good=1;
int bad=0;
printf ("good is:%d",good);
}
Answers were Sorted based on User's Feedback
Answer / suresh kumar beniwal
multiple declaration of bad
so error occur
write program is
#define good bad
main()
{
int good=1;
bad=0;
printf ("good is:%d",good);
}
output :
good is : 0
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / elango
ans:0
Explain:
#define good bad
is denoted by good = bad,
printf("good is:%d",good);
ans"0
| Is This Answer Correct ? | 1 Yes | 0 No |
main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
Write a complete program that consists of a function that can receive two numbers from a user (M and N) as a parameter. Then print all the numbers between the two numbers including the number itself. If the value of M is smaller than N, print the numbers in ascending flow. If the value of M is bigger than N, print the numbers in descending flow. may i know how the coding look like?
Printf can be implemented by using __________ list.
To reverse an entire text file into another text file.... get d file names in cmd line
Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable, but aac or bcd are unacceptable.
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];
plz send me all data structure related programs
There were 10 records stored in “somefile.dat” but the following program printed 11 names. What went wrong? void main() { struct student { char name[30], rollno[6]; }stud; FILE *fp = fopen(“somefile.dat”,”r”); while(!feof(fp)) { fread(&stud, sizeof(stud), 1 , fp); puts(stud.name); } }
main() { int i; i = abc(); printf("%d",i); } abc() { _AX = 1000; }