- 1
What's Wrong with this code? I just can't tell đ.
#include <stdio.h> #include <stdlib.h> int main(); { char c; int i; float f; double d; char = ' a'; int = 1; float = 19.0; double = 2000.0009; printf("c%\n", c); printf("%d\n", i); printf("%f\n", f); printf("%f\n", d); return (0); }
3 Answers
+ 8
Values are equal to variables not data types
c = 'a';
i = 1;
f = 19.0;
d = 2000.0009;
printf("%c\n", c);
+ 1
and
printf("%lf\n",d);
+ 1
1. Semicolon after main function.
2. char = 'a' int = 1 float = 12.0 double = 2000.0009
Data types can not hold values.