Answer the following problems.
problem 1) Describe any five library functions provided in C to manipulate Strings.
problem 2) prepare a detail note on Preprocessor Directives.
problem 3) prepare a short note on Command Line Arguments.
problem 4) prepare the algorithm and draw flowchart to check whether the given string is palindrome or not.
problem 5) Find and justify output of the following program segment:
#include
void main( )
{
char ch = ‘A’;
int i = 2;
float f = ++ch+i;
printf(“%f %d %c”, f, ch, ch);
}
problem 6) Find and justify output of the following program segment :
#include
void main( )
{
int n = 63;
printf(“\n n is %d”, n);
printf(“\n n is %2d”, n);
printf(“\n n is %4d”, n);
printf(“\n n is %6d”, n);
printf(“\n n is %-6d”, n);
printf(“\n n is %\d”, n);
}
problem 7) Find and justify output of the following program segment :
#include
main( )
{
int u1, u2;
int v = 3;
int * pv;
u1 = 2 * (v + 5);
pv = &v;
u2 = 2 * (* pv + 5);
printf(“\n u1 = %d u2 = %d”, u1, u2);
}
problem 8) Complete the following program segment:
void main( )
{
int n = 5;
int fact;
fact = factorial(n);
printf(“%d”, fact);
}