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

can we access one file to one directory?

1 Answers  


Find the highest of three numbers and print them using ascending orders?

1 Answers  


What is oops c?

0 Answers  


What is static and volatile in c?

0 Answers  


What are the applications of c language?

0 Answers  






which one is better structure or union?(other than the space occupied )

2 Answers  


What is c programming structure?

0 Answers  


Why & is used in c?

0 Answers  


Is null always equal to 0(zero)?

0 Answers  


which of the following statements is incorrect a.typedef struct new{ int n1; char n2; } DATA; b.typedef struct { int n3; char *n4; }ICE; c.typedef union { int n5; float n6; } UDT; d.#typedef union { int n7; float n8; } TUDAT;

5 Answers   Assurgent, TCS,


which type of aspect you want from the student.

0 Answers   IBM, TCS,


How does free() know explain how much memory to release?

0 Answers  


Categories