Skip to main content

Distinguish different from of main() functions in C language.


Answer:

C permits different forms of main statement. The following forms are allowed:

            (i) main()
            (ii) main(void)
            (iii) int main()
            (iv) void main()
            (v) void main(void)
            (vi) int main(void)


(i) main(): The empty pair of parentheses main().

(ii) main(void):  The main(void) indicates that the function has no argument.

(iii) int main(): The statement int main() indicates that the function returns an integer value to the operating system.

(iv) void main(): The statement void main() indicates that the function does not return any information to the operating system.

(v) void main(void): The statement void main(void) indicates that the function does not return any information to the operating system and it has no argument.

 (vi) int main(void): The statement int main(void) indicates that the function returns an integer value to the operating system and it has no argument

Popular posts from this blog

Draw the basic organization of computer

Answer:                 The basic organization of computer__ Input Unit: ·          It accepts (or reads) instructions and data from outside. ·          It converts these instructions and data in computer acceptable form ·          It supplies the converted instructions and data to the computer system for further processing. Central Processing Unit (CPU): Control Unit: Control unit of a computer system manages and coordinates the operations of all other components of the computer system. Arithmetic Logic Unit(ALU): Arithmetic logic unit of a computer system is the place, where the actual executions of instruction, takes place during processing operation. Storage Unit: Primary Memory: It is volatile ( loses data on power ...

Differences between positional and non-positional number system?

Answer: Positional Number System: In positional number system, there are only a few symbols called digits, and these symbols represent different values depending on the position they occupy in the number. The value of each digit in such a number is determined by three considerations__ 1.       The digit. 2.       The position of the digit in the number. 3.       The base of the number system.