July 6, 2021 in C and CPP
Which of the following expression is equivalent to ++*ptr?
1.2 Which of the following expression is equivalent to ++*ptr?
A) (*ptr)++
B) ++*(ptr)
C) (ptr)*++
D) (ptr)++*
July 6, 2021 in C and CPP
1.2 Which of the following expression is equivalent to ++*ptr?
A) (*ptr)++
B) ++*(ptr)
C) (ptr)*++
D) (ptr)++*
July 6, 2021 in C and CPP
1.1 By default a real number is treated as a
A) float
B) double
C) long double
D) integer
July 6, 2021 in C and CPP
c) What is type conversion? What are the rules of implicit type conversion?
July 6, 2021 in C and CPP
b) Suppose a file contains student’s records with each record containing name and age of a
student. Write a program to read these records and display them in sorted order by name.
July 6, 2021 in C and CPP
a) Explain the difference between linker and loader? What is the significance of compilation in C programming language?
July 6, 2021 in C and CPP
b) What is the output of the following with reference to the following program segment?
int x[3][5] = {
{1, 2, 3, 4, 5},
{6, 7, 8, 9, 10},
{11, 12, 13, 14, 15}
},*n=&x;
1. *(*x + 2) + 5
2. *(*(x + 1))
3. *(*(x) + 2) +1
4. *(*(x+1) +3)
5. *n
6. *(n+2)
7. ++*n
8. *(n+5) + 1
July 6, 2021 in C and CPP
a) Why is a linked list called a dynamic data structure? What are the advantages of using linked list over arrays? Also explain different types of linked list along with their applications.
July 6, 2021 in C and CPP
b) Write a recursive function to obtain the first 25 numbers of a Fibonacci sequence. In a Fibonacci sequence the sum of two successive terms gives the third term. Following are the first few terms of the Fibonacci sequence:
1 1 2 3 5 8 13 21 34 55 89.....
July 6, 2021 in C and CPP
a) Write a function that receives marks received by a student in 3 subjects and returns the average and percentage of these marks (assume all subject have 100 as maximum marks). Call this function from main( ) and print the results in main( ).
July 6, 2021 in C and CPP
c) Differentiate between Nested Structures and Array of Structures. Also give a typical example of use of each of them.