July 6, 2021 in C and CPP
Which header file should be included to use functions like malloc() and calloc()?
1.4 Which header file should be included to use functions like malloc() and calloc()?
A) memory.h
B) stdlib.h
C) string.h
D) dos.h
July 6, 2021 in C and CPP
1.4 Which header file should be included to use functions like malloc() and calloc()?
A) memory.h
B) stdlib.h
C) string.h
D) dos.h
July 6, 2021 in C and CPP
1.3 The default storage class of a ‘C’ variable is
A) auto
B) static
C) extern
D) register
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.....