In C program, at end of the program we will give as "return 0"
and "return 1", what they indicate? Is it mandatory to specify
them?

Answers were Sorted based on User's Feedback



In C program, at end of the program we will give as "return 0" and "return 1",..

Answer / ranjeet roy

if the return type of our function is int ..
thn it is maindetory to return something like 0 nd 1..
but if we declare the return type void
then doesnt require

Is This Answer Correct ?    21 Yes 1 No

In C program, at end of the program we will give as "return 0" and "return 1",..

Answer / hari

yeah....... its necessary to return some value if the return type of main() is 'int'.
in fact we can return any valid integer.
here are few examples... all are correct;;;;;;>

return 0;
return 1;
return 100;
return -3;
return 'c';

Is This Answer Correct ?    5 Yes 0 No

In C program, at end of the program we will give as "return 0" and "return 1",..

Answer / ritu

yes

Is This Answer Correct ?    0 Yes 0 No

In C program, at end of the program we will give as "return 0" and "return 1",..

Answer / sivavendra

Yes, it is mandatory to return some value if return type of main() is specified as "int"

Is This Answer Correct ?    0 Yes 0 No

In C program, at end of the program we will give as "return 0" and "return 1",..

Answer / kalyan chukka

i think 0 and 1 are the true false.

Is This Answer Correct ?    1 Yes 11 No

Post New Answer

More C Interview Questions

What is difference between stdio h and conio h?

0 Answers  


What is selection sort in c?

0 Answers  


Why c is known as a mother language?

0 Answers  


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

0 Answers  


what is the difference between c and c++?

7 Answers  






Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

0 Answers   TCS,


What is calloc() function?

0 Answers  


5. distance conversion: Convert a distance from miles to kilometers .there are 5280 feets per mile,12 inches per foot .2.54 centimeters per inch and 100000centimeters per kilometer

4 Answers  


What is meant by realloc()?

0 Answers  


What is an lvalue?

0 Answers  


How do shell structures work?

0 Answers  


what is the difference between structural,object based,object orientd programming languages?

1 Answers   PanTerra,


Categories