Question PRG-C-0050
MediumWhat is the output of this program?
#include <stdio.h>
int main() {
char s[] = "abcde";
char *p = s;
while (*p) p++;
printf("%d", (int)(p - s));
return 0;
}
- A.
5
- B.
0
- C.
Sign up free to see the answer and a step-by-step explanation.