Hi,
main()
{
}

Is a user defined function or Built in Functionn

Answer Posted / pravat kumar patra

main() is a user defind function.because we write some codes
inside main to perform certain task.but in case of sqrt() if
write the function in a program it executes.but we have not
to write the function body.
consider the case:-
void main() void main()
{ {
printf("hello"); inti=25,p=sqrt(i);
} printf("%d",p);
}

use header file math.h.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are pointers? Why are they used?

632


What does void main return?

611


What are the rules for identifiers in c?

592


What is the use of getch ()?

640


4. main() { int c=- -2; printf("c=%d",c); }

1373






in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures

680


Explain how do you determine a file’s attributes?

597


Why is c known as a mother language?

751


What is null character in c?

695


write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.

1988


Write a program to print "hello world" without using a semicolon?

600


Explain how can I convert a string to a number?

647


What are compound statements?

632


Write a simple code fragment that will check if a number is positive or negative.

711


What are logical errors and how does it differ from syntax errors?

663