Q:

Write a C program to print the following characters in a reverse way

0

Write a C program to print the following characters in a reverse way. 
Test Characters: 'X', 'M', 'L'
Expected Output:
The reverse of XML is LMX

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <stdio.h> 
 int main() 
 {
    char char1 = 'X';
    char char2 = 'M';
    char char3 = 'L';
	printf("The reverse of %c%c%c is %c%c%c\n",char1, char2, char3,char3, char2, char1);
	return(0);
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Basic Declarations and Expressions exercises

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a C program to compute the perimeter and are... >>
<< Write a C program to print a block F using hash (#...