Interview Question

Junior Associate IT Interview

-Gurgaon, Haryana, Haryana

Daffodil Software

Q1. Input string : A3B2C3D4 Output string should be : AAABBCCCDDDD

Answer

Interview Answers

3 Answers

6

int main()//INPUT: A3B2C4 OUTPUT:AAABBCCCC { int i,j,k=0; char str1[30],str2[200]; cout<<"Enter a string"<

MOHAMMAD IMRAN on

1

import java.util.Scanner; public class StringNum { public static void main(String[] args) { String s; Scanner scan=new Scanner(System.in); s=scan.nextLine(); String [] arr=s.split(""); for(int i=0;i

Anonymous on

19

String s = "A3B2C3D4"; String b = ""; for(int i=0;i

Anand Gupta on

Add Answers or Comments

To comment on this, Sign In or Sign Up.