Tuesday, October 23, 2018

CP UNIT 4 QUESTIONS


Define command line arguments.
 Declare a struct name containing field’s first_name, middle_name, last_name within a struct student.
Differentiate between structure and unions.
Write a program using command line to print the statement “I am proud of my country”.
Define function prototype. Give the general syntax of function prototype.
Why do we need structures?

Define structures. Write a C program using functions to return the sum of two complex numbers passed as parameters.
Explain enumerated data types with an example.
Define union. Differentiate between union and structures.
With an example program, explain structure within structure.
What is the role of stack in recursion?
Why to use typedef?
Write a recursive function in C to find the sum of array elements.
Explain the following:(i) Structure with in structure.
(ii) Self reference structure.
Write the recursive function to compute
f(n)=n/2 when n is even f(n)=3n+1 when n is odd
How to pass the structures to functions as an argument? Explain with a suitable example.
Write any two differences between union and structure.
What is the use of typedef?
What is the difference between a structure declaration and a structure initialization?
Define a function & explain why function prototype is essential
Illustrate the need of structures with an example.
Differentiate between structure and union types.
Write a C program to demonstrate the use of array of structures.
What is union? Write a C program to store information in a union and display it
Illustrate recursion with an example.
What is the use of typedef in C?
Explain all the function prototypes with examples.
Demonstrate with a suitable example, the use of structure within a structure.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home