Write a function expand(s1,s2) that expands shorthand
notations like a-z in the string s1 into the equivalent
complete list abc...xyz in s2 . Allow for letters of either
case and digits, and be prepared to handle cases like a-b-c
and a-z0-9 and -a-z.
z-a:zyx......ba
-1-6-:-123456-
1-9-1:123456789987654321
a-R-L:a-R...L
a-b-c:abbc


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

what is the value of b if a=5; b=++a + ++a

31 Answers   Infosys, TCS, Tech Mahindra,


Given an unsigned integer, find if the number is power of 2?

5 Answers  


A C E G H +B D F A I ------------ E F G H D

1 Answers   Infosys,


The code is::::: if(condition) Printf("Hello"); Else Printf("World"); What will be the condition in if in such a way that both Hello and world are printed in a single attempt?????? Single Attempt in the sense... It must first print "Hello" and it Must go to else part and print "World"..... No loops, Recursion are allowed........................

14 Answers   HOV Services, IBM, Potty,


what is the use of pointers

6 Answers   Adobe, GrapeCity,






what does " calloc" do?

7 Answers   Cadence, Logos,


The C language terminator is a.semicolon b.colon c.period d.exclamation mark

6 Answers   TCS,


which one is highest Priority in c? a)=,b)+,c)++,d)==

4 Answers  


Tell me what are bitwise shift operators?

0 Answers  


What is typedef struct in c?

0 Answers  


#include<stdio.h> void main() { char *str; long unsigned int add; str="Hello C"; add=&str[0]; printf("%c",add); } What is the output?

4 Answers   Infosys,


why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above

0 Answers  


Categories