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
how can i write reverse digit function like writing 1234 and printing 4321
What happens while a derived-class object is developed & destroyed? A: Space is allocated (on the heap or the stack) for the full object (i.e. adequate space to store the data m
Consider text comprised of sentences and sentences comprised of words. Words in a sentence will be space delimited. Given a text and K strings, task is to find out the number valid
Unions A union is also like a structure, except that only single variable in the union is stored in the allocated memory at a time. It is a collection of mutually exclusive var
While spending the summer as a surveyor’s assistant, you decide to write a program that transforms compass headings in degrees (0-360) to compass bearings. A compass bearing consis
At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes
Hi I''m trying to connect to CISCO router using termios. So I decided to have two threads one for reading data and the other one for writing data. The problem is that I have to add
Define the Meaning of Call by reference? In "call-by- reference", as an alternative of passing the value of a variable, the location number (or the address) of the variable is
Exceptions. Your SVector class should throw four exceptions: 3.1. If the constructor size is invalid, then it will just allow the implicit STL bad_alloc exception to pass up to mai
to calculate area of the circle
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd