Advertisements
Advertisements
Explain recursive function. Write a program to find the GCD of a number by using recursive function.
Concept: undefined >> undefined
Predict output of following program segment.
main()
{
int a,b,*p1,*p2,x,y;
clrscr();
a=48;b=10;p1=&a;p2=&b;
x=*p1**p2-8;
*p1=*p1+*p2;
y=(*p1/ *p2)+20;
printf("%d%d%d%d%d%d",*p1,*p2,a,b,x,y);
}
Concept: undefined >> undefined
Advertisements
Predict output of following program segment.
main()
{
int x=4, y=9,z;
clrscr();
z=x++ + --y+y;
printf("\n%d%d%d",x,y,z);
z= --x+x+y--;
printf("\n%d%d%d",x,y,z);
getch();
}
Concept: undefined >> undefined
What is recursion? WAP using recursion to find the sum of array elements of size n.
Concept: undefined >> undefined
WAP to print following pattern for n lines. [Note: range of n is 1-9]
1
121
12321
1234321
Concept: undefined >> undefined
WAP to print binary equivalent of entered decimal no.
Concept: undefined >> undefined
What is the usage of storage classes? Explain extern storage classes with suitable example.
Concept: undefined >> undefined
what is significance of storage classes? Explain it with relevant examples.
Concept: undefined >> undefined
