answersLogoWhite

0


Best Answer

You can create a separate string initially empty. Then using a loop, start at the end of the string and add it to the end of the other string. At the end of the loop, the other string would contain the reverse.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

StringBuilder stringBuilder = new StringBuilder("abcd");

stringBuilder.reverse(); //bcda

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: String reverse program with single string and without using library functions in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is string library functions syntax?

String library function is one which is used to perform an operation in C-programming,without which library functions likestrlen(),strcp(),strcmp(),strdup(),strrev(),etc..,.can be performed


Can you compile program without header file?

Yes,we can compile our program without header file without any error,but we can not use any predefine functions like printf,scanf.


What is the advantage of using functions and write a c program to explain about built-in functions with examples?

C does not have any built-in functions as such. The language allows the programmer to create functions or to include functions contained in external function libraries, but the language itself has no functions whatsoever. The C standard library is not considered built-in since programmers are free to ignore the standard library completely. However, the library contains highly efficient, optimised functions that are considered "general purpose" and therefore useful to the majority of programmers. The programmer can use these functions as the basis for more complex, more specialised functions. The main advantage of functions is that they allow programmers to break programs down into a series of simple subroutines, each of which is handled by a function. Functions can call other functions, including themselves, and can be called as often as required. Although some code duplication is inevitable in any program, by placing duplicate code in a function, the programmer ensures that the code remains consistent. Since the function code is in one place, it is much easier to maintain that code, there is no need to make multiple changes across all duplicates, which is error prone and could introduce inconsistencies. Also, with well-named functions, code becomes self-documenting, making it easier to express ideas in code without the need for verbose comments within the code itself, which tends to be distracting rather than helpful.


How do you write a C plus plus program that creates and manipulates a dynamic one dimensional array storing a string entered by user without using any C plus plus Standard functions?

In short you cannot, unless you provide a suitable alternative to the standard library yourself (in other words, reinvent the wheel). At the very least you will need to include the common runtime definitions (crtdefs.h) just to create a bare-bones program that does absolutely nothing, but you'll need to implement all the standard IO functions yourself. Even third-party replacements make extensive use of the standard library, so you're completely on your own here. The standard library exists so that you can draw upon a rich set of primitive but highly optimised, tried and tested functions which act as building blocks upon which you can create your own programs.


Importance of functions in c?

Based on execution 1. Iterative Function 2. Recursive Function Based on Argument and return value 1. No argument No return value 2. With argument Without return value 3. With out argument without return value 4. With argument With return value

Related questions

What is the importance of using functions in a c program?

C programs do not function without functions.


What is string library functions syntax?

String library function is one which is used to perform an operation in C-programming,without which library functions likestrlen(),strcp(),strcmp(),strdup(),strrev(),etc..,.can be performed


Can you write a c program without using headerfile?

Yes, but if you intend to do any useful work and call any library functions, you will need to know their prototypes in order to call them. That's one of the values of the headerfile.


What is the importance of functions in a c plus plus program?

Functions are very important in C++, as you can't write the simplest program to print hello without using a function. Overall you can say that function are building blocks of a C++ program. Functions can also be defined by the programmer to reduce program size.


Can you compile program without header file?

Yes,we can compile our program without header file without any error,but we can not use any predefine functions like printf,scanf.


What is a program for finding sqareroot of a number without using functions?

you read the book how to solve by dromy.


How do you link a C plus plus program to C functions?

It should work without any special action.


How do you get a char from the keyboard in your C program without waiting?

OS-dependent. For DOS use functions kbhit and getch from conio.h


Write a program in C without any functions?

It is not possible. In C, any program must have at least one function to be able to compile and execute properly: the function main()


How many functions in c progamming?

One or more. (In other words: you cannot write a program without at least one function.)


What is the advantage of using functions and write a c program to explain about built-in functions with examples?

C does not have any built-in functions as such. The language allows the programmer to create functions or to include functions contained in external function libraries, but the language itself has no functions whatsoever. The C standard library is not considered built-in since programmers are free to ignore the standard library completely. However, the library contains highly efficient, optimised functions that are considered "general purpose" and therefore useful to the majority of programmers. The programmer can use these functions as the basis for more complex, more specialised functions. The main advantage of functions is that they allow programmers to break programs down into a series of simple subroutines, each of which is handled by a function. Functions can call other functions, including themselves, and can be called as often as required. Although some code duplication is inevitable in any program, by placing duplicate code in a function, the programmer ensures that the code remains consistent. Since the function code is in one place, it is much easier to maintain that code, there is no need to make multiple changes across all duplicates, which is error prone and could introduce inconsistencies. Also, with well-named functions, code becomes self-documenting, making it easier to express ideas in code without the need for verbose comments within the code itself, which tends to be distracting rather than helpful.


How do you write a C plus plus program that creates and manipulates a dynamic one dimensional array storing a string entered by user without using any C plus plus Standard functions?

In short you cannot, unless you provide a suitable alternative to the standard library yourself (in other words, reinvent the wheel). At the very least you will need to include the common runtime definitions (crtdefs.h) just to create a bare-bones program that does absolutely nothing, but you'll need to implement all the standard IO functions yourself. Even third-party replacements make extensive use of the standard library, so you're completely on your own here. The standard library exists so that you can draw upon a rich set of primitive but highly optimised, tried and tested functions which act as building blocks upon which you can create your own programs.