Programming by using c


Q1. Write down the outputs of the given code segments, if any and validate your answers.

a) #define CUBE(x) (x * x * x)
main( ) {
printf(“%d”, CUBE(4+5));
}

b) int k,j = 5;
printf(“%d”, k = j == 6);
printf(“%d”, k = ++j == 6);

c) for (j = 0; j = 3; j++)
printf(“%d”, j);

Q2. What do you mean by preprocessor directives? List all the three types of them. Illustrate the difference between the given directives: #include and #include “filename”?

Q3. Write down a program to make a matrix m× n by using dynamic memory allocation then find out the transpose of this matrix.

Q4. Write down a C program to make a file which contains a series of integer numbers and then reads all the numbers of this file and writes all odd numbers to other file termed odd and writes all the even numbers to a file termed even.

Q5. Write brief notes on any four of the given:

a) Divide and Conquer strategy
b) Algorithms and its features
c) Recursion
d) Advantages and disadvantages of using the functions
e) Storage classes in C

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Programming by using c
Reference No:- TGS011136

Expected delivery within 24 Hours