LogiQuest
Back to Strings
4

What will be the output of the program?

#include <stdio.h>

int main(void) {
    char s[] = "abc";
    int i, n = 0;
    for (i = 0; s[i] != '\0'; i++) n++;
    printf("%d\n", n);
    return 0;
}
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.