Computer Science, asked by allfizzedup3371, 9 months ago

Iven the below statements about c programming language: 1) main() function should always be the first function present in a c program file 2) all the elements of an union share their memory location 3) a void pointer can hold address of any type and can be typcasted to any type 4) a static variable hold random junk value if it is not initialised

Answers

Answered by sailorking
0

Answer:

1) Main function in a C program is the place where the execution of the codes starts and then the use of several functions and methods are called as per requirements.

2) Union in C programming is used for the purpose of creating non-primitive data type. They are alike 'structures' in C programming, but there is only one difference that is union makes use of a single space in memory, which is decided by the largest size of the primitive datatype present in the union.

3) Void in java means that a function needs nothing to return and only perform some activity, when they are invoked.

4) A static variable is a variable which stores it's data not in RAM but in the registers, and the value of a static variable remains same throughout the program.

Similar questions