What will be the output of the following C++ code? [code] #include <stdio.h> #include <ctype.h> int main () {

Lò Ngọc

New member
What will be the output of the following C++ code?
Code:
    #include <stdio.h> 
    #include <ctype.h>
    int main ()
    {
        int i = 0;
        char str[] = "C";
        while (str[i])
        {
            if (isalpha(str[i])) 
                printf ("alphabetic");
            else 
                printf ("not alphabetic");
            i++;
        }
        return 0;
    }
A. alphabetic
B. not alphabetic
C. Error
D. alphabeticnot alphabetic
 

Tìm kiếm

Back
Top