1. What is pointer? Explain with example to print the address of variable using pointer. 2. What is pointer? Which arithmetic operations are not valid on pointers? 3. Explain array... 1. What is pointer? Explain with example to print the address of variable using pointer. 2. What is pointer? Which arithmetic operations are not valid on pointers? 3. Explain array of pointers with suitable example. 4. What is pointer? Which arithmetic operations are valid on pointers? 5. What is pointer to pointer? Write suitable example to demonstrate the concept. 6. Explain with suitable example structure variable and pointer to structure variable. 7. Define a structure data type called time_struct containing three member's integer hours, minutes, second. Develop a program that would assign values to individual member and display the time in following format: HH:MM:SS. 8. What is structure? How to access the elements of structure? How to calculate size of structure? Explain with example. 9. Explain how structure variable is initialized with suitable example. 10. Distinguish between Structure and Union. 11. What is dynamic memory allocation? Explain important functions associated with it. 12. Explain fopen() and its mode with example to write a string into file. 13. Describe file management. And list the various file management functions. 14. Write a program to illustrate the use of fputc() and fputs().

Question image

Understand the Problem

The image contains a list of questions related to computer science topics, specifically pointers, structures, dynamic memory allocation, and file management. These questions are typical assignments or exam questions that require explanations and examples.

Answer

Pointers store memory addresses. Invalid operations: multiplication, division. Array of pointers can hold multiple addresses. Pointer to pointer is a pointer to another pointer. Use dot/arrow operators to access structure elements. Dynamic memory uses malloc(), etc. fopen() modes open files. fputc()/fputs() write to files.

Pointers store memory addresses of other variables. Valid operations are addition and subtraction, while invalid ones include multiplication and division. An array of pointers is a collection of pointer variables. Pointer to pointer means a pointer that holds the address of another pointer. For structures, access members using the dot operator or arrow operator with pointers. Use sizeof() to calculate the size. Dynamic memory allocation functions include malloc(), calloc(), realloc(), and free(). fopen() modes help open files for reading or writing. fputc() writes a character to a file; fputs() writes a string.

Answer for screen readers

Pointers store memory addresses of other variables. Valid operations are addition and subtraction, while invalid ones include multiplication and division. An array of pointers is a collection of pointer variables. Pointer to pointer means a pointer that holds the address of another pointer. For structures, access members using the dot operator or arrow operator with pointers. Use sizeof() to calculate the size. Dynamic memory allocation functions include malloc(), calloc(), realloc(), and free(). fopen() modes help open files for reading or writing. fputc() writes a character to a file; fputs() writes a string.

More Information

Pointers are foundational in C programming, allowing manipulation of memory directly. Dynamic memory allocation is crucial for efficient memory use. Structures and file operations provide data organization and persistence.

Tips

Common mistakes include confusing pointer arithmetic with regular arithmetic, and misunderstanding the syntax for accessing structure members.

AI-generated content may contain errors. Please verify critical information

Thank you for voting!
Use Quizgecko on...
Browser
Browser