We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
Pgm in c CIA-II important qp:Set-A
1. How do you declare a pointer variable in C?
2. Describe the difference between an array and an array of pointers. 3. What is the purpose of using typedef in C programming? 4. Discuss the concept of a singly linked list. 5. What is a structure in C? Give an example. 6. What is a union in C? Give an example. 7. Describe how command line arguments are accessed in a C program. 8. Explain the difference between fopen() and fclose() functions in file handling. 9. How do you read and write data to a file in C programming? 10. Define file processing in C and differentiate between sequential and random access. 11 a) Discuss the concept of pointers in C programming. Explain pointer declaration, initialization, and dereferencing with suitable examples. (16)(Or) b) Explain pointer arithmetic in C programming. Discuss various pointer operators and their functionalities. Provide examples (16) 12 a) Define structures and unions in C programming. Differentiate between structures and unions, highlighting their similarities and differences, with suitable example.(16)(Or) b) Discuss the concept of nested structures and provide an example. (16) 13 a) Explain how pointers can be used with structures, including accessing structure members and dynamic memory allocation for structures.(16) (Or) b) Describe the concept of self-referential structures in C programming. Provide an example of a self-referential structure such as a linked list node. (16) 14 a) Explain the difference between sequential access files and random access files, including their advantages and disadvantages. Provide examples to illustrate each type of file processing. (16)(Or) b). Provide examples to illustrate how command line arguments can be used to customize program behavior and handle input/output operations. (16) 15 a) Discuss the significance of storage classes in variable declaration, memory allocation, and program optimization. (16)(Or) b) Discuss how command line arguments are passed to a C program using the main () function parameters argc and argv. (16) Set-2 1. Define pointer arithmetic and provide an example. 2. Explain pass by value and pass by reference parameter passing methods. 3. What is a structure in C? Give an example. 4. How do you declare nested structures in C? 5. Explain the purpose of typedef in C programming. 6. Discuss the concept of self-referential structures with an example. 7. Explain the concept of sequential access files with an example. 8. How do you perform random access file operations in C? 9. What are command line arguments in C programming? 10. How do you open a file in C for reading and writing? 11 b) Compare and contrast pass by value and pass by reference parameter passing methods in C programming with suitable example.(16) (Or) b) Discuss the concept of array of pointers and provide examples to illustrate its usage in storing and accessing multiple strings (16) 12 a) Explain the use of malloc(), calloc(), realloc(), and free() functions to allocate and deallocate memory dynamically during program execution. (16)(Or) b) Describe the concept of self-referential structures in C programming. Provide an example of a self-referential structure such as a linked list node (16) 13 a) Explain how structures are used to group related data elements under a single name, and unions are used to store different data types in the same memory location. Provide examples(16)(Or) b) Provide examples to demonstrate the declaration, initialization, and access of nested structures, highlighting their practical applications in organizing and representing data. ( (16) 14 a) Explain sequential access file processing in C programming. Discuss how sequential access files are opened, read from, written to, and closed using file handling functions. (16)(Or) b) (i) Discuss the significance of storage classes in variable declaration, memory allocation, and program optimization.(8) (ii) Explain the role of command line arguments in C programming with suitable example. (8) 16 a) Demonstrate the reading and writing of data to sequential access files, give suitable examples. (16)(Or) b) Explain in detail about random access files, including their advantages and limitations. Provide examples to illustrate each type of file processing.(16)