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
Answer / iftekhar qurashi
last function in the program to avoid prototyping.
if we write it as a first function and other functions is declared after main(), then main function can't find it.
but it can be declared anywhere in the program when we declared every function except main() in the beginning of program
for other consultancy you can mail me
regards
iftekhar qurashi
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vishwanath g. desai
d. Any where in the program, because it is a top down
program ok I agree with that, actually the feature wise we
have to write the first but now the compiler agree with the
answer d. While the program execute means it execute the
first main().
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / katrina
main shouldnt be written in c programming but infact it is
main()
Is This Answer Correct ? | 0 Yes | 3 No |
what is the output of the following program? main() { int c[]={2,8,3,4,4,6,7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf("%d",*c); ++q; } for(j=0;j<5;j++) { printf("%d",*p); ++p; } }
what is the different between data structure and data type?
suppose we use switch statement and we intilize years name using enum statement like(jan,feb,mar,------dec) we take integer value as an input .question is that the month which we analyz is from 0 to 11 bt if i enter 12 than how he again starts from begning and print jan
What is the purpose of ftell?
What is nested structure?
main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); } wat is the o/p and how?
What are the advantages of using macro in c language?
What is formal argument?
What is function definition in c?
What does d mean?
What is #pragma directive?how it is used in the program? what is its advantages and disadvantages?
What is a union?