Q:

What is the output of the C Program with strings ?? int main() { char str[2]; int i=0; scanf("%s", str); while(str[i] != '') { printf("%c", str[i]); i++; } return 0; } //Input: KLMN

A) KLMN B) KL
C) Compiler error D) None of the above
 

View Answer Explanation

Category: C Language MCQ
Sub Category: Strings

33