How structure in C is different from the union? Give example
10.A) How structure in C is different from the union? Give example Answer:- Example of Structure struct student { int rollno; char name[50]; string phone; }; Example of Union…
10.A) How structure in C is different from the union? Give example Answer:- Example of Structure struct student { int rollno; char name[50]; string phone; }; Example of Union…
9. B) Define a structure by the name DoB consisting of three variable members dd, mm, and yyof type integer. Develop a C program that would read values to the…
9.A) How does a structure differ from an array? Answer:- 9. A) How does a structure differ from an array? Answer : Sl.no Arrays Structures 1. Array is a collection…
8. C) How actual parameters are different from formal parameters? Explain. Answer: Sl.no Actual parameters Formal parameters 1. When a function is called, the values that are passed in the…
8. B) Define a function. List various advantages of a function. Answers:- “Functions are independent program modules that are designed to carry out a particulartask.” In functions we have two…
8. A) Differentiate between call by value and call by reference using suitable examples. Answer:- Parameters Call by value Call by reference Definition While calling a function, when you pass…
7. B) What is recursion? Write a C program to computer factorial using recursion. Answer:- “Recursion is the repetitive process in which a function calls itself” C Program for Factorial…
7. A) Demonstrate the use of C user-defined functions with a suitable example. Answer:- User-defined functions are written by programmers to serve their own purpose and arenot readily available. Functions…
Mention the purpose of a Null Character in C strings. If you use a literal string in a program, it is stored in consecutive bytes in memoryand the compiler places…
6. B) Mention various operations that can be performed on strings using built-in functions.Explain any two functions. Answer:- Function Work of Function strlen() computes string’s length strcpy() copies a string…