+ 4
There's a problem in my C code,Could anyone help me please
Hi guys,could you please help me with my code? #include <stdio.h> #define { BEGIN #define } END #define main() START #define STARS "******" main() { printf(STARS); printf("\nThere are 6 stars above and 6 stars below"); printf(STARS); } The compiler gives error for the { and }
4 Respostas
+ 1
Thank you a lot but I need my code for an exercise for my university,and I must mention these #define parts.It's an exercise that wants us show how we can replace one character with another by using define
+ 1
wow ,thanks a lot
0
The only special character that can be used in the name of a varible, expression, etc in C is the underscore.
I am unsure what you are trying to do with #define BEGIN and #define END but they are not need as well as the main.
Check out this code and see if it was what you were wanting to happen.
https://code.sololearn.com/cjGdR3fRzwCQ/?ref=app
0
Ahh gotcha. If the prompt was given exactly like that idk, but other wise I think I
https://code.sololearn.com/cjGdR3fRzwCQ/?ref=app found a workin solution.
Seems you just have a few of the parts mixed up