CP Questions R15 JNTUA UNIT III,IV and V
UNIT-III 2 Marks
1.
Explain call by reference.
2.
What does this statement indicate p = **a; where
p and a are variables?
3.
How many maximum arguments can be passes by
return ( )?
4.
Define type qualifiers
5.
Give syntax to create a pointer to function.
6.
Explain malloc() function.
7.
Write a C program for call by reference.
8.
What is pointer? Give its General form.
9.
What is meant by storage class of variable?
10.
Write a function to swap two integer elements.
UNIT-III 10 Marks
1.
Explain pointers and arrays with some example
programs.
2.
Discuss the problems associated with pointers.
3.
Define Pointer. Write a C program to find the
sum of the all elements in given array using pointers.
4.
Define scope. Briefly explain the scope, life
time and visibility of Identifier.
5.
List the different storage classes in C and
explain each one of them.
6.
Write a C program to exchange the value of two
integers using call by reference.
7.
Give a detailed note on pointer expressions.
8.
List and explain the storage classes with
examples.
9.
What is meant by the scope of variables and
summarize types of storage class in C?
10.
Write a program to assign any number at random
to an integer variable k and display the same through pointer.
11.
Discuss any two storage class specifiers.
12.
What are the problems with pointers?
13.
Explain dynamic memory allocation functions of C
with a suitable example.
14.
Compare call by value with call by reference and
explain using a suitable example.
15.
Illustrate with a suitable example the use of
return statement.
16.
Write a C program to calculate the sum of all
elements of an array using pointers as arguments.
17.
What is a pointer? Write a program in C to
reflect the concept of pointers to functions.
UNIT-IV 2
Marks
1.
Define command line arguments.
2.
What is the role of stack in recursion?
3.
Declare a struct name containing field’s
first_name, middle_name, last_name within a struct student.
4.
Differentiate between structure and unions.
5.
Define function prototype. Give the general
syntax of function prototype.
6.
Why do we need structures?
7.
Why to use typedef?
8.
Write any two differences between union and
structure.
UNIT-IV 10 Marks
1.
Write a recursive function in C to find the sum
of array elements.
2.
Write a program using command line to print the
statement “I am proud of my country”.
3.
Define structures. Write a C program using
functions to return the sum of two complex numbers passed as parameters.
4.
Explain enumerated data types with an example.
5.
Define union. Differentiate between union and
structures.
6.
With an example program, explain structure
within structure.
7.
Explain the following:(i) Structure with in
structure.(ii) Self reference structure.
8.
How to pass the structures to functions as an
argument? Explain with a suitable example.
9.
What is the difference between a structure
declaration and a structure initialization?
10.
Define a function & explain why function
prototype is essential
11.
Illustrate the need of structures with an
example.
12.
Write a C program to demonstrate the use of
array of structures.
13.
What is union? Write a C program to store
information in a union and display it
14.
Illustrate recursion with an example.
15.
Explain all the function prototypes with
examples.
16.
Demonstrate with a suitable example, the use of
structure within a structure.
UNIT-V 2
Marks
1.
Define a file.
2.
How to define a global constant?
3.
Write a statement to open a file in reading
mode.
4.
Define Stream. List different types of Streams.
5.
What is the problem with getchar ()?
6.
Discuss the types of streams.
7.
What is a pre-processor?
8.
Write different built-in (library) functions
provided by ‘C’ language for handling I/O operations on files.
9.
What is the use of the preprocessor directives?
UNIT-V 10 Marks
1.
Explain FILE structure in detail.
2.
Describe formatted input output statements.
3.
Explain fprintf() and fscanf() functions with an
example program.
4.
Define Preprocessor directives. Discuss Marco
replacement with an example.
5.
Write a C program that reads characters from the
keyboard and writes them to a disk file until the user types a dollar sign.
6.
Describe the following file functions.
(a)
fopen().(b) fclose().(c) getc(). (d) putc(). (e)
feof().
7.
How to use fseek() for random access of the file
content?
8.
What role does the fseek() plays and how many
arguments does it Have?
9.
What are the features of C preprocessor? Give
the differences between macros and functions
10.
Write a sample C program to demonstrate the
control string of scanf() function.
11.
Write a C program to read name and marks of N
number of students from user and store them in a file.
12.
Write a C program to demonstrate the use of
fscanf and fprintf functions.
13.
Write a program in C to illustrate the use of
rewind and fseek functions.
14.
Write a program in C that reads files and
displays them on the screen.