How do I write a program to print proper subset of given
string . Eg :input: abc
output:{},{a},{b},{c},{a,b},{a,c},{b,c},
{a,b,c}.I desperately need this program please mail me to
saravana6m@gmail.com

Answers were Sorted based on User's Feedback



How do I write a program to print proper subset of given string . Eg :input: abc out..

Answer / pankaj

i have written the program to find all the proper subsets,but it doesnt print them in order
ex:
{a,b,c}
it will print:
{}
{a}
{a,b}
{b}
{a,c}
so on
(not in order}
if u want it mail me(goodluck87@gmail.com)

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More C Code Interview Questions

Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.

6 Answers   Fusion Systems GmbH,


main() { char *p; p="Hello"; printf("%c\n",*&*p); }

1 Answers  


main() { show(); } void show() { printf("I'm the greatest"); }

2 Answers  


main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above

5 Answers   HCL,


Write a c program to search an element in an array using recursion

1 Answers   Wipro,






hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?

6 Answers  


Cau u say the output....?

1 Answers  


main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }

1 Answers  


Finding a number multiplication of 8 with out using arithmetic operator

8 Answers   Eyeball, NetApp,


Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


C program to print magic square of order n where n > 3 and n is odd

2 Answers   Accenture,


#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }

2 Answers  


Categories