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 |
When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
How will you write a code for accessing the length of an array without assigning it to another variable?
What is function what are the types of function?
c language interview questions & answer
c program to manipulate x=1+3+5+...+n using recursion
If input is 123 then how to print 100 and 20 and 3 seperately?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it
how to swap 2 numbers within a single statement?
write a program to find the given number is prime or not
2 Answers Accenture, Vasutech,
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What is c definition?