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 |
Why C language is a procedural language?
What are the different types of constants?
What is Full Form of C and Why We use C
Do you know what are bitwise shift operators in c programming?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
write a program to display the array elements in reverse order in c language
Why is %d used in c?
what is the full form of c language
How can I access an I o board directly?
Can a file other than a .h file be included with #include?
What is the use of function overloading in C?
What is a constant and types of constants in c?