Explaining preprocessor directives-command line arguments


Answer the following questions.

Question 1) Describe any five library functions provided in C to manipulate Strings.

Question 2) Write a detail note on Preprocessor Directives.

Question 3) Write a short note on Command Line Arguments.

Question 4) Write the algorithm and draw flowchart to check whether the given string is palindrome or not.

Question 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);
}

Question 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);
}

Question 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);
}

Question 8) Complete the following program segment:

void main( )
{
int n = 5;
int fact;
fact = factorial(n);
printf(“%d”, fact);
}

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Explaining preprocessor directives-command line arguments
Reference No:- TGS05348

Expected delivery within 24 Hours