PGDCA Previous Year Questions (C)

1.  Draw flow chart and write algorithm to print Fibonacci series upto the number of terms entered by the user.

 2. Write recursive and iterative program in C, to find factorial of a number entered by the user.

3. Explain the concept of call by reference, with suitable code in C. Compare it with call by value mechanism.

4. Compare the terms Typedef and Typecast in C. Give suitable code for each. Also discuss utility of both.

5. Discuss the relation between arrays and pointers. Give suitable example in support of your discussion.

6. Compare Global variables with Local variables. Give suitable example for each.

7.  What are iterators ? How do iterators differ from iterables ? Give example for each.

8. Compare Buffered I/O with Unbuffered I/O in C.

9. Write a program in C to generate the following pattern :

10. In C, how && operator differs from & operator ? Support your comparison with suitable code in C.

11. Write short notes on the following (give utility of each) :

(i) Storage classes in C

(ii) Decorators in Python

(iii) Cursor objects

(iv) Functions and its types

12.Differentiate between the structure and union construct in C. Write suitable code for each.

13. Write a program in C to verify that the string entered by the user is palindrome or not. Support your program with suitable comments.

14. Write an algorithm to find the slope of a line segment whose end point coordinates are (x1, y1) and (x2, y2 ). The algorithm gives output whether the slope is positive, negative or zero. Transform your algorithm into C program. Note : Slope of line segment = (y 2– y1)/ (x2 – x1).

15. Write short notes on the following : (i) 10 Looping constructs and its types in C (ii) Functions and its types in C Give suitable example for each.

16. Write a program in C to calculate the product of two matrices. Support your code with suitable comments.

17. Briefly discuss the concept of “Call by value” and “Call by reference”. Give example code in C for each. Support your code with suitable comments.

18. Compare flowchart and algorithm. Draw a flowchart to find the factorial of a number entered by a user.

19. Write a program in C to print all ASCII codes. Support your program with comments for better readability.

20. Write steps to create a package. Apply these steps to create a package named volume and create 3 modules in it named cube, cuboid and sphere, having function to calculate volume of the cube, cuboid and sphere respectively. Import the modules defined in the package and use the defined functions for calculation of volume respectively.

21. Compare Sequential and Random access of files in C. Briefly discuss the syntax and role of fseek( ) and rewind( ) function, while accessing a file randomly.

22. Write an algorithm to find the HCF (Highest Common Factor) of the two numbers entered by a user. Transform your algorithm into a C program, support your program with suitable comments.




  • To Share this Blog, Choose your plateform


Write your Testimonial

Your review is very precious for us.


Rating: