#include<stdio.h>

main()

{

const int i=4;

float j;

j = ++i;

printf("%d %f", i,++j);

}



#include<stdio.h> main() { const int i=4; float j; ..

Answer / susie

Answer :

Compiler error

Explanation:

i is a constant. you cannot change the value of constant

Is This Answer Correct ?    9 Yes 1 No

Post New Answer

More C Code Interview Questions

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); } }

1 Answers  


Is the following code legal? struct a { int x; struct a b; }

1 Answers  


Write a c program to search an element in an array using recursion

1 Answers   Wipro,


void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }

3 Answers  


code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123

1 Answers   HCL,






#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }

1 Answers  


main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }

1 Answers  


main() { char not; not=!2; printf("%d",not); }

1 Answers  


How to swap two variables, without using third variable ?

104 Answers   AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,


main() { int i=5,j=6,z; printf("%d",i+++j); }

2 Answers  


program to Reverse a linked list

12 Answers   Aricent, Microsoft, Ness Technologies,


Printf can be implemented by using __________ list.

3 Answers  


Categories