- 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(); }

15th Jan 2022, 2:56 PM
Raviraj Pawar
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.
15th Jan 2022, 3:11 PM
Arsenic
Arsenic - avatar
0
Maybe you want to traverse the string replace s[i]!==NULL to s[i]!='\0' clrscr() to system("cls")
15th Jan 2022, 3:14 PM
FanYu
FanYu - avatar