Dear Members,
"Today we share with you an important lesson"
In this lesson we tell you about those errors which can be made by every beginner programmer at that time when they write C program.
In this post we tell you that what happen if you made these mistakes during writing C program
SO FRIENDS LETS START LESSON
- ERROR No 1).
- Leave #include<stdio.h> :-
#include<stdio.h>
int main(void)
{
printf("My first Program in C");
}
A header file must be included at the beginning of the program. If its functions are to be used in the program. In the above program, the printf() function is used to print the message. It is part of header file "stdio.h". When you leave out the #include<stdio.h> line from the program given above, the C compiler displays an error message as shown below:
''Function 'printf' should have a prototype''
- ERROR No 2).
- Leave Semicolon :-
Statement Missing ;
Hope this lesson is really helpful for you. If you like this lesson don't forget to make a comment on it.
Thanks for your time.
No comments:
Post a Comment