Define array. State its types.
Definition: An array is a data structure which can hold a number of values of the same data type.
The different types of array are:
one dimensional
two dimensional
-----------------------------------------------------------------
State one difference between the terms variable and constant.
Variable: It is a data name that is used to store a data value. The values of variables can be changed in the program.
Constant: It is referred to as a fixed value that does not changewhile the program is under execution.
------------------------------------------------------------------
State the use of continue statement.
Continue is used to force the next iteration of the loop to take place, skipping any code in between.
------------------------------------------------------------------
Define structure.
A structure is a user defined data type in C. A structure creates a data type that can be used to group items of possibly different types into a single type. „struct‟ keyword is used to create a structure.
-----------------------------------------------------------------
Give output for following code:
# include <stdio.h>
main ( )
{
int i=4;
if(i= =5)
printf(“\n I am in Fy”);
else
printf(“\n I am in Sy”);
}
Output: I am in Sy
---------------------------------------------------------------
0 Comments