- 2

#include <stdio.h> int main() { int a, b; float salary = 56.23; char letter = 'Z'; a = 8; b = 34; int c

Can some one tell me what is wrong with this code

30th May 2021, 4:29 PM
Manash Anand
Manash Anand - avatar
5 Answers
+ 2
In the last line the "int c" there is a missing semicolon so it should be "int c;" and also it will give you unused variable error because you're not using its value
30th May 2021, 4:31 PM
Eashan Morajkar
Eashan Morajkar - avatar
0
and there's no closing bracket.
30th May 2021, 4:43 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
0
What error did you get? something like "unused variable" if so then that's because you have not used any of the variable and they take up memory so the compiler warns you about it
30th May 2021, 4:52 PM
Eashan Morajkar
Eashan Morajkar - avatar
0
Manash Anand yeah and who puts the code in the title? the title got a strict word limit
30th May 2021, 4:53 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
- 1
No that's a copy paste mistake I just copy select all and then paste it but it delete last two of the character
30th May 2021, 4:46 PM
Manash Anand
Manash Anand - avatar