C Programming
Full Marks: 60
Pass Marks: 24
Time: 3 hours
What is the difference between exit(0) and exit(1)? Discuss the need of nested structure with and example. Write a program to find the val;ue of x^y awithout using POW function. [2+3+5]
Why do we need break and continue statement? Define formal argument and actual argument in function with example. Identify and list the errors in following code. [2+3+5]
int main()
{
int a,b,c
scanf("%d%d,&a,&b,&c);
sum(a,b,c);
return -1;
}
void sum(int x,int y,int z){
int sum;
sum = a + b + c;
return sum;
}
Write a program to demonstrate the following menu driven program. The user will provide an integer and an alphabet for making a choice and corresponding task has to be performed accordingly as follows.
A. Find Odd or Even
B. Find Positive or Negative
C. Find the Factorial Value
D. Exit
The choice will be displayed until the user give “D” as choice. [10]