Write a c program to print string reverse order using pointer

#include <stdio.h>
#include <string.h>
void main() {
    char s[100]; 
    printf("Enter a String\n");
    scanf("%s",s);
    char *p=s+strlen(s)-1;
    while(p>=s) 
        printf("%c",*p--);
    
}