Use of structures with pointers


Q1.

a) Write down a C program to compute the standard deviation of an array of values. The array elements are read from terminal.

b) Write down a program to copy input to output, replacing every string of one or more blanks by using a single blank.

Q2.

a) Distinguish between the local and global variable. Write down a C program to exemplify the effect of global variable on the output of program.

b) Write down a C program which reverses a number which is entered by the user by making use of Do-while loop. How is this looping method distinct from the while loop?

c) Describe with the help of an appropriate illustration the use of structures with the pointers.

Q3.

a) Consider a linked list to store a polynomial, which is, every node of the linked list consists of coefficient, exponent and pointer to the next node in the list.

i) Define a structure for the node of such a list.

ii) Write down a function to subtract two such polynomials. The function must accept pointers to the two polynomials as arguments and return the pointer to the resulting polynomial. Suppose that the polynomials passed to the function are in reducing order on the exponents.

b) Distinguish between the White Box and Black Box Testing and as well elucidate the Path testing.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Use of structures with pointers
Reference No:- TGS010366

Expected delivery within 24 Hours