"I LOVE MY COUNTRY"
write a c program to get "COUNTRY MY LOVE I" as the output.

Use any other programming language. It is not mandatory to
use C.

Answer Posted / debmalya paul

package Stringmltp;
import java.util.Scanner;

public class country {

static Scanner in=new Scanner(System.in);

void rev()
{
String s=in.nextLine();
System.out.print(s.substring(10,17) +" "+ s.substring(7,9) +" "+ s.substring(2,6) +" "+ s.substring(0,1));

}
public static void main(String []args)
{
country cn=new country();
cn.rev();
}

}

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can one function call another?

619


What is extern c used for?

561


What is equivalent to ++i+++j?

637


Where are some collections of useful code fragments and examples?

704


What is the purpose of main( ) in c language?

610






Why doesnt long int work?

603


How do you list a file’s date and time?

622


any "C" function by default returns an a) int value b) float value c) char value d) a & b

656


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1512


How does sizeof know array size?

616


Why #include is used in c language?

586


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

3722


What are qualifiers in c?

565


Which type of language is c?

640


write a c program to calculate sum of digits till it reduces to a single digit using recursion

2711