- 1
Can any one explain me this...? What's wrongâ
#include<stdio.h> #include<conio.h> void main() { char s[11]="javatpoint"; int i=0; int count=0; clrscr(); while(s[i]!==NULL) { if(s[i]=='a'||s[i]=='e'||s[i]=='i'||s[i]=='o'||s[i]=='u') { count++; } i++; } printf("\n Number of Vowels=%d",count); getch(); }
2 Answers
+ 2
You are most probably using this ancient non-standard C program which is exclusively meant for old DOS based compilers ( like turbo ), and are trying to compile it using a modern compiler.
0
Maybe you want to traverse the string
replace
s[i]!==NULL to s[i]!='\0'
clrscr() to system("cls")