Skip to content

Instantly share code, notes, and snippets.

Last active October 27, 2022 14:08
What would you like to do?
3 - Reverse string
#include <stdio.h>
#include <string.h>
int main()
char str[100], strmain[100], strup[100];
printf("Enter the string to reverse:\n");
for (int i = 0; str[i] != '\0'; i++) {
strup[i] = toupper(str[i]);
strcpy(strmain, strup);
printf("Final result: %s%s \n", strmain, strup);
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment