How to add spaces in between characters in a char array without using builtin fuctions

Input- "java"

output-" j a v a"

That is inserting a space in between two characters in a char array

In a char array without using any built in functions like append. if possible provide the code also

Replies

  • Anoop Kumar
    Anoop Kumar

    I will give you logic

    //------------------ 
    ... 
    For  int i = 0  to inputString.Length -1 
        If i == 0
            print inputString.charAt(i)
        Else 
            Print 
            Print inputString.charAt(i)
        End If
    End For loop
    ... 
    //------------------ 


  • Harsha Swamy
    Harsha Swamy

    no bro doesn't work 

  • Anoop Kumar
    Anoop Kumar

    Give your code please ! 

    I don't see any issue with the logic. I created a code snippet and it works fine.

  • Harsha Swamy
    Harsha Swamy

    My bad it actually worked thanks Anoop....

You are reading an archived discussion.

Related Posts

Everywhere you look at, we see technology. But sometimes having a technology limits us from thinking outside the box on various other ways we could use the same technology.One example...
I was testing a wireless charging Litz wire coil at work today and realized something strange to me. The formula I know for calculating AC resistance is "Z = √...
i have fest in my college so i want some different and crazy ideas.
How to determine Yield Strength from ultimate tensile strength of a material? Also is there any difference between tensile strength and ultimate tensile strength as well as tensile stress and...