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 C++

4 Answers  


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

0 Answers  


How to set a variable in the environment list?

1 Answers  


atoi, which takes a string and converts it to an integer. 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

0 Answers  


What is %g in c?

0 Answers  






write a program to print infinte number

4 Answers  


Can you mix old-style and new-style function syntax?

0 Answers  


What has to put when we are inserting as assembly language code into the C code? or When we are inserting as assembly language code into the C code we have to insert one thing at the start and of the assembly language. What are they?

2 Answers  


Write a program using two-dimensional array that lists the odd numbers and even numbers separately in a 12 input values.

1 Answers  


#include<stdio.h> main() { int i=5; printf("%d",i*i-- - --i*i*i++ + ++i); } tell the answer with correct reason .specially reason is important nt answer ans by turbo c is -39

1 Answers   GameLoft,


Write the program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.

3 Answers   Google,


What is a null pointer in c?

0 Answers  


Categories