July 7, 2021 in C and CPP
Define a two dimensional array ‘int a[10][10]’.
c) Define a two dimensional array ‘int a[10][10]’. Write a ‘C’ program to initialize this array with numbers between 0 and 99. Then print the contents of ‘a’.
July 7, 2021 in C and CPP
c) Define a two dimensional array ‘int a[10][10]’. Write a ‘C’ program to initialize this array with numbers between 0 and 99. Then print the contents of ‘a’.
July 7, 2021 in C and CPP
b) What are command line arguments? Explain with the help of a suitable example.
July 7, 2021 in C and CPP
a) What is dynamic memory allocation? Mention four functions used for dynamic memory
manipulation.
July 7, 2021 in C and CPP
c) List out the rules to declare a valid variable in ‘C’ program. Evaluate the following expression and show the hierarchy of operations:
(2 + 4)/3 + 2 % 3 * 2 - 5
July 7, 2021 in C and CPP
b) How Compilation, Linking and Loading are related? Also explain the basic task of a Compiler, Linker and Loader.
July 7, 2021 in C and CPP
a) Write a program using function to read an array from the user and print the odd number at odd position and prints the even numbers at even positions. For example input array is 1 2 3 4 and output is 2 1 4 3.
July 7, 2021 in C and CPP
c) Evaluate the following expressions, indicating which ones are true or false.
1. 10 = = 9 + 1
2. 10 && 8
3. 8 || 0
4. 0 && 0
5. Let X = 10 and Y=9;
X >= 8 && Y <= X
July 7, 2021 in C and CPP
b) What is union data type? Define a union ‘u’ to hold a integer, float and character variable.
July 7, 2021 in C and CPP
a) What is the significance of header file in a C Program? What do the header files usually
contain?
July 7, 2021 in C and CPP
b) Write a function to swap two integers. The function does not return any value.