Main must be written as
a.the first function in the program
b.Second function in the program
c.Last function in the program
d.any where in the program

Answers were Sorted based on User's Feedback



Main must be written as a.the first function in the program b.Second function in the program ..

Answer / ningappa

any where in the program

Is This Answer Correct ?    81 Yes 3 No

Main must be written as a.the first function in the program b.Second function in the program ..

Answer / swamy s t

Answer is D. any where in the program.

No matter whereever it is because the program should
starts or begins from main() function only.

Is This Answer Correct ?    30 Yes 3 No

Main must be written as a.the first function in the program b.Second function in the program ..

Answer / manju

d.any where in the program
because the execution of a program begins from the main
function.it doesn't consider the place where the main
function written.

Is This Answer Correct ?    16 Yes 2 No

Main must be written as a.the first function in the program b.Second function in the program ..

Answer / piyush

its d.any where in the program

Is This Answer Correct ?    9 Yes 1 No

Main must be written as a.the first function in the program b.Second function in the program ..

Answer / devvv

main function is a basic in c programming
language.generally main is written first.but when executing
modular programs ,to avoid prototyping, other functions
are written first.so main can be written anywhere in a
program.but atleast one of the other functions must be
declared in main.

Is This Answer Correct ?    11 Yes 4 No

Main must be written as a.the first function in the program b.Second function in the program ..

Answer / nathan

any where in the program

Is This Answer Correct ?    8 Yes 2 No

Main must be written as a.the first function in the program b.Second function in the program ..

Answer / guest

d. any where in the program.

Is This Answer Correct ?    6 Yes 1 No

Main must be written as a.the first function in the program b.Second function in the program ..

Answer / maskfriend

d.any where in the program. but it should declare after the
declaration of veriable where it starts execution of the
program

Is This Answer Correct ?    6 Yes 2 No

Main must be written as a.the first function in the program b.Second function in the program ..

Answer / amala v

anywhere in the program

Is This Answer Correct ?    4 Yes 1 No

Main must be written as a.the first function in the program b.Second function in the program ..

Answer / sudipta panja

(d)--execution starts from main,i.e. compiler starts
compiling from main but the posn of main is not fixed.it can
be anywhere.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C Interview Questions

Do pointers need to be initialized?

0 Answers  


What are the 5 elements of structure?

0 Answers  


what is the output of the following program? #include<stdio.h> void main() { float x=1.1; while(x==1.1) { printf("\n%f",x); x=x-0.1; } }

6 Answers  


CopyBits(x,p,n,y) copy n LSBs from y to x starting LSB at 'p'th position.

9 Answers   Adobe,


Why enum is used in c?

0 Answers  






to convert a string without using decrement operater and string functions

1 Answers  


#include<stdio.h> #include<conio.h> void main() { clrscr(); int a=0,b=0,c=0; printf("enter value of a,b"); scanf(" %d %d",a,b); c=a+b; printf("sum is %d",c); getch(); }

2 Answers  


3. Program to print all possible substrings. ex: String S St Str Stri Strin String t tr tri trin tring r

3 Answers   Huawei,


Define recursion in c.

0 Answers  


what is out put of the following code? #include class Base { Base() { cout<<"constructor base"; } ~Base() { cout<<"destructor base"; } } class Derived:public Base { Derived() { cout<<"constructor derived"; } ~Derived() { cout<<"destructor derived"; } } void main() { Base *var=new Derived(); delete var; }

3 Answers   Honeywell,


Hi, main() { } Is a user defined function or Built in Functionn

26 Answers   Honeywell, Yahoo,


void main() { int a=1; while(a++<=1) while(a++<=2); }

4 Answers   HCL,


Categories