how to execute with out main in cprogram

Answer Posted / sushil kumar

Well Done !!!!!!!
I can give an explanation
When a c program is compiled the preprocessor process the code and replace the macros in the code
IN void rawat()
#define rawat ravinder(m,b,a,j,n,i) replaces rawat so code becomes
void ravinder(m,b,a,j,n,i)()
which calls the first macro to replace ravinder(m,b,a,j,n,i) by m##a##i##n i.e main
so now we have
void main()

that's why this code executes correctly
C always requires a main program to execute

Is This Answer Correct ?    23 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are enumerated types?

644


What is static function in c?

617


Can we declare function inside main?

553


explain what are actual arguments?

624


which is conditional construct a) if statement b) switch statement c) while/for d) goto

726






Why is this loop always executing once?

607


What is printf () in c?

571


How can I find out if there are characters available for reading?

631


What is a structure in c language. how to initialise a structure in c?

595


What is assert and when would I use it?

568


What are header files? What are their uses?

628


Explain what is a pragma?

579


Do pointers store the address of value or the actual value of a variable?

600


Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

588


What will be the outcome of the following conditional statement if the value of variable s is 10?

749