Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

what are the errors in this program, i'd like to know

+1 vote
asked Oct 20, 2017 by anonymous
#include<stdio.h>

void main()
{

printf ("n\My formula for success?\nRise early,worklate,strike

                                                               oil.");
}

17 Answers

0 votes
answered Jan 8, 2018 by anonymous
there are no errors in this program
0 votes
answered Jan 8, 2018 by sruthi n (220 points)
we use \n for printing a text in next line.But in above code in printf statement it is typed as n\
0 votes
answered Jan 24, 2018 by anonymous
ERROR USE \n
0 votes
answered Jan 24, 2018 by Robayet Al Hamim (310 points)
0 votes
answered Jan 26, 2018 by Al3x76 (180 points)
Correct lines:

printf ("\nMy formula for success?\nRise early,worklate,strike \

                                                               oil.");
0 votes
answered Jun 5, 2018 by Nikhil Kakkireni (320 points)
printf closes in one line only
0 votes
answered Jun 5, 2018 by Saurabh (600 points)

I don't know why you have written printf  in different different line.write your code as below hope you won't get any error

#include<stdio.h>

void main()


printf ("n\My formula for success?\nRise early,worklate,strike oil.");

}

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...