Ad Code

Responsive Advertisement

MGKVP BCA II sem 'c programming ' Model question paper

 Section A: Short Answer Questions

1.    Explain the difference between an array and a pointer in C.

2.    Write a C function to swap the values of two integers using pointers.

3.    What are the differences between malloc() and calloc() functions? Give an example of each.

4.    Discuss the purpose of the static keyword in C. Provide an example of its usage.

5.    Explain the concept of recursion in C with an example.

6.    How does the typedef keyword work? Provide a scenario where it can be useful.

7.    Define a structure called Book with the following members: title, author, year,        and price. Write a function to display the details of a book.

8.    Given an array of integers, write a C program to find the second largest                   element in the array.

Section B: long Answer type questions

1.    Write a C program to find and print all prime numbers between 1 and N, where N is taken as user input.

2. Write a c program to print all prime numbers from 200 to 2000.

3.    Create a C program that simulates a simple banking system. Implement functions to deposit, withdraw, and check balance. Use structures to represent bank accounts.

4.    Write a C program that reads a text file named "input.txt" and counts the number of occurrences of each word in the file. Ignore punctuation and consider words case-insensitively.

 

 


Post a Comment

0 Comments