Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
C Program to FIND THE EVEN WORDS IN THE STRING
#include conio.h>
#include stdio.h>
void main()
{
char a[50],temp;
int i=0,k=0,l[25],c=0,r=0;
clrscr();
for(i=0;i<25;i++)
l[i]=0;
}
i=0;
printf("ENTER THE STRING: ");
do
a[i++]=getchar();
}while(a[i-1]!='\n');
a[i]='\0';
printf("%s",a);
for(i=0;a[i]!='\0';i++)
if(a[i]==' ' || a[i]=='\n')
temp=a[k];
a[k]=a[i-1];
a[i-1]=temp;
k=i+1;
c++;
else
l[c]++;
for(i=0;l[i]!=0;i++)
if(l[i]%2==0)
r++;
printf("%s\n",a);
printf("THE TOTAL NO OF EVEN WORDS ARE: %d",r);
getch();
OUTPUT :
ENTER THE STRING: KAMLESH D MENGAR
HSELMAK D RAGNEM
THE EVEN WORDS ARE : 1
Should I explicitly call a destructor on a local variable? Explain it.
Program is to read the characters from keyboard: Program is to read the characters from keyboard one by one stored in different files as upper constants, lower constants, othe
Mixed Mode Expressions and Implicit type Conversions A mixed mode expression is one in which the operands are not of the similar type. In this case, the operands are converted
What is a newline escape sequence? - A newline escape sequence is signified by the \n character. - It is used to insert a new line whereas displaying the output data. - T
Integer literal Integer is numbers without fractional parts. e.g. 20 // Decimal 024 // Octal 0x14 // Hexadecimal To indicate long, unsigned,
Why shouldn't Matrix class's interface look like an array-of-array? A: Some people build a Matrix class that has an operator[] that returns a reference to an Array object (or po
Calculate the area of circle using c program: const float Pi = 3.1415926; inline float area(const float r) {return Pi * r * r;} main() { float radius;
The break statement The break statement, which was already covered in the switch.. case, can also be used in the loops. When a loop statement is encountered in the loops the co
why is count function used in c''
basic salary of employees & calculate net salary in C++ Programming
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd