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 |
how to generate sparse matrix in c
What is hash table in c?
main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) }
5 Answers Amazon, HCL, Thought Works,
What are the characteristics of arrays in c?
What is the difference between ‘g’ and “g” in C?
how c source file in converted to exe file
write a program to find the number of even integers and odd integers in a given array in c language
13 Answers IAI Cameroun, NIIT, Olive Tech, QIS,
How do I get a null pointer in my programs?
44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?
What is far pointer in c?
what is the output of the code and how? main() { int *ptr,x; x=sizeof(ptr); printf("%d",x); }
int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output?