I am too lazy to implement the reverse function so I made cursed version instead.
#include <stdio.h> // Credit: https://www.programmingsimplified.com/c-program-reverse-string #define function int #define main main() { #define consolelog printf #define Systemscanf gets #define konodioda return function main char s[1000], r[1000]; int begin, end, count = 0; consolelog("Input a string\n"); Systemscanf(s); // Calculating string length while (s[count] != '\0') count++; end = count - 1; for (begin = 0; begin < count; begin++) { r[begin] = s[end]; end--; } r[begin] = '\0'; consolelog("%s\n", r); konodioda 0; }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I am too lazy to implement the reverse function so I made cursed version instead.