PROGRAMMING AND PROBLEM SOLVING THROUGH ‘C’ LANGUAGE

1.1 The following is a program
Main()
{
int x = 0;
while(x<=10)
for( ; ; )
if( ++ x%10 = =0)
break;
printf(“x = %d”, x);
}
What will be the output of the above program?
A) Will print x = 10
B) Will give compilation error
C) Will give runtime error
D) Will print x = 20

What is a Structure? Define a structure that contains the following members:

What is a Structure? Define a structure that contains the following members:
i) An integer quantity called acct_no
ii) A character called acct_type
iii) A 40-element character array called name
iv) A floating-point quantity called balance
v) A structure variable called lastpayment, of type date: defined as an integer called
month; an integer called day; an integer called year
vi) Include the user_defined data type account within the definition.
vii) Include structure variable customer, which is 100-element array of structures
called account.