There are several question to address in your code, let's go at them in order:
Firstly scanf with %s specifier is a dangerous proposition as it's very easy to cause a buffer overflow leading to undefined behavior.
Keep in mind that a 4 character string will need an array of size 5 because it needs space for the null byte.
Then, if you reverse to the point you also reverse the null byte at the end of the original buffer, that means that it will be placed at the beginning of the destination buffer and will make it an empty string as far as printf is concerned.
Finally the while loop must allow i to get to 0, otherwise revInput[0] will not be filled.
So correcting your code, it would look something like this:
Live demo
#include <stdio.h>
#include <string.h>
#define SIZE 5
int main(void) {
printf("\nPlease enter a four digit number:\n");
char input[SIZE];
char revInput[SIZE];
scanf("%4s", input); // %4s specifier will only parse 4 chars and add
// the null byte as the 5th
int i = SIZE - 2; // i will go from 3 to 0, the null byte at index 4 will
// not be reversed
int k = 0;
while (i >= 0) {
revInput[k] = input[i];
i--;
k++;
}
k++;
revInput[k - 1] = '\0'; // -1 because of k's last increment
printf("Reversed: %s\n", revInput);
}
If you wanted a more robust solution, for example, you don't know the exact size of the input, you could make a small tweak to your code to adapt it to variable sized input:
Live demo
int main(void) {
printf("\nPlease enter a four digit number:\n");
char input[SIZE];
char revInput[SIZE] = {0}; // zero out the dest array
scanf("%4s", input);
int i = strlen(input); // i at last index of input, the null byte
int k = 0;
while (i-- >= 0) {
revInput[k++] = input[i];
}
printf("Reversed: %s\n", revInput);
}
One last trick you could use, is to get the length of the string directly from scanf without the need for strlen:
Live demo
#include <stdio.h>
#define SIZE 5
int main(void) {
printf("\nPlease enter a four digit number:\n");
char input[SIZE];
char revInput[SIZE] = {0}; // zero out the dest array
int i;
int k = 0;
// lets add a condition to make sure scanf is successful
if (scanf("%4s%n", input, &i) > 0) {
while (--i >= 0) {
revInput[k++] = input[i];
}
printf("Reversed: %s\n", revInput);
}
}