If "AaBbCc" is passed to the char

char x(*a)
{
a[0]?x(a+1):1;
printf("%c",a[0]);
return 1;
}
what will be the output?

Answers were Sorted based on User's Feedback



If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",..

Answer / fazlur rahaman naik

the output will b cCbBaA

Is This Answer Correct ?    3 Yes 0 No

If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",..

Answer / roopa

cCbBaA

Is This Answer Correct ?    3 Yes 0 No

If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",..

Answer / ravi saini

Recursion based question........

Output wil be

cCbBaA

Is This Answer Correct ?    3 Yes 0 No

If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",..

Answer / vint

char x(char *a) // Argument Pointer declaration was missing
{
a[0]?x(a+1):1;
printf("%c",a[0]);
return 1;
}

Output: cCbBaA

Is This Answer Correct ?    0 Yes 0 No

If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",..

Answer / roopa

cba

Is This Answer Correct ?    0 Yes 1 No

If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",..

Answer / roopa

bBcCbBaA

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

Define macros.

0 Answers   Tech Mahindra,


Explain what are preprocessor directives?

0 Answers  


What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main(); }

1 Answers  


What is a stream?

0 Answers  


what is the disadvantage of using macros?

1 Answers   Wipro,






How can I run c program?

0 Answers  


What are the data types present in c?

0 Answers  


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

0 Answers  


how to find greatet of 10 numbers without using array?

4 Answers  


Are global variables static in c?

0 Answers  


What do you mean by keywords in c?

0 Answers  


what is the flow of execution in cprogram? ex:printf();,scanf();

2 Answers  


Categories