Why use int main instead of void main?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

write function to reverse char array ... without using second array

3 Answers  


Just came across this question, felt worth sharing, so here it is I want you to make a C/C++ program that for any positive integer n will print all the positive integers from 1 up to it and then back again! Let's say n=5 I want the program to print: 1 2 3 4 5 4 3 2 1. Too easy you say? Okay then... You can ONLY USE: 1 for loop 1 printf/cout statement 2 integers( i and n) and as many operations you want. NO if statements, NO ternary operators, NO tables, NO pointers, NO functions!

1 Answers  


How does C++ help with the tradeoff of safety vs. usability?

1 Answers  


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

0 Answers  


Explain 'bus error'?

0 Answers  


What is #pragma directive?how it is used in the program? what is its advantages and disadvantages?

2 Answers  


Explain what is gets() function?

0 Answers  


Can an array be an Ivalue?

0 Answers   EXL,


Explain how can I read and write comma-delimited text?

0 Answers  


struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer

0 Answers  


how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--);

19 Answers   RMSI,


Is it fine to write void main () or main () in c?

0 Answers  


Categories