Question
1 What is the difference between the function malloc() and calloc()? 2 What is a pointer in reference to C language? How do you declare
1 What is the difference between the function malloc() and calloc()?
2 What is a pointer in reference to C language? How do you declare pointers? Explain using a suitable example.
3 Explain the term “calling function by reference”. How do you declare pointers? Explain using a suitable example.
4 Write a program to read two integer X and Y and swap the contents of the variable x and Y using pointers.
5. what is a structure? Explain the components of a structure.
6 what is the difference between a structure variable and a union variable? What are the difference between structure and array?
7. (A) Write a short notes on nested structure.
8 What are embedded structure? Give an appropriate example for embedded structure.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
The detailed answer for the above question is provided below 1 Difference between malloc and calloc malloc Memory Allocation Allocates a specified number of bytes of memory Does not initialize the all...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started