What is the output of the following C program?
[gamipress_button type=”submit” label=”Run Code Online” onclick=”window.open(‘https://coderseditor.com’,’_blank’)”]
int fun(char *str1) { char *str2 = str1; while(*++str1); return (str1-str2); } int main() { char *str = "geeksforgeeks"; printf("%d", fun(str)); getchar(); return 0; }
Studently Answered question October 10, 2022