You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include <stdio.h>
int main() {
char ch[10];
scanf("%s",&ch);
printf(ch);
}
On line scanf("% s", & ch); shows an error, but it is running and working, my question is, why does the Netbeans IDE 8.2 program show everything normally without any errors, but in the Geany 1.36 program it shows an error but is executed?
The text was updated successfully, but these errors were encountered:
Geany only shows errors and warnings that your compiler finds, so you need to ask the compiler why, and it will depend on the particular compiler, its version, and its defaults.
Here using gcc 9.3.0 there are warnings on both the scanf and the printf, both valid warnings of bad practice but neither illegal C (which is why they are warnings not errors) nor (in this case) do they do the wrong thing when executed, but thats C for you.
Why hasbeens doesn't show the warnings is a problem for it.
#include <stdio.h>
int main() {
char ch[10];
scanf("%s",&ch);
printf(ch);
}
On line scanf("% s", & ch); shows an error, but it is running and working, my question is, why does the Netbeans IDE 8.2 program show everything normally without any errors, but in the Geany 1.36 program it shows an error but is executed?
The text was updated successfully, but these errors were encountered: