What's Wrong with this code? I just can't tell 😑. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 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); }

13th Jun 2021, 12:40 AM
Mwamba
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);
13th Jun 2021, 12:46 AM
Simba
Simba - avatar
+ 1
and printf("%lf\n",d);
13th Jun 2021, 7:04 AM
Ciro Pellegrino
Ciro Pellegrino - avatar
+ 1
1. Semicolon after main function. 2. char = 'a' int = 1 float = 12.0 double = 2000.0009 Data types can not hold values.
14th Jun 2021, 4:05 PM
Pragya Singh
Pragya Singh - avatar