do u print this format '(((())))'. This brackets is based on
user input like 4 or 5 or 6,without using any loop's?
Answer / ashutosh tiwari
int r;
Void main()
{
scanf("%d",&r);
fun();
}
void fun()
{
static int t = r;
printf("(");
if(--t != 0)
fun();
printf(")");
}
OR
void main()
{
int r,i;
scanf("%d",&r);
i=r;
repeat1:
if(i != 0)
{
printf("(");
i--;
goto repeat1;
}
i=r;
repeat2:
if(i != 0)
{
printf(")");
i--;
goto repeat2;
}
}
| Is This Answer Correct ? | 11 Yes | 2 No |
Explain how to reverse singly link list.
write a c/c++ program that takes a 5 digit number and calculates 2 power that number and prints it?
What are volatile variables in c?
When should you use a type cast?
Write one statement equalent to the following two statements x=sqr(a); return(x); Choose from one of the alternatives a.return(sqr(a)); b.printf("sqr(a)"); c.return(a*a*a); d.printf("%d",sqr(a));
What is the ANSI C Standard?
How can I pad a string to a known length?
What is the size of array float a(10)?
Explain about the constants which help in debugging?
What are the key features of C?
What will be the output of x++ + ++x?
What is meaning of tree