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 for SWAPPING THE STRING
#include conio.h>
#include stdio.h>
void main()
{
char a[50],temp=0;
int i=0,c=0,c1=0,l=0;
clrscr();
printf("ENTER THE STRING= ");
flushall();
do
a[i++]=getchar();
}while(a[i-1]!='\n');
a[i]='\0';
for(i=0;a[i]!='\0';i++)
if(a[i]==' ' || a[i]=='\n')
c++;
}
printf("\nTHE TOTAL NO OF WORDS BEFORE SWAPING IS %d\n\n",c);
l=strlen(a);
l--;
temp=a[i];
a[i]=a[i+1];
a[i+1]=temp;
i++;
for(i=0;a[i]!=0;i++);
if(l%2!=0)
temp=a[i-2];
a[i-2]=a[i-1];
a[i-1]=temp;
else
a[i]='\n';
a[i+1]='\0';
printf("%s",a);
c1++;
printf("\nTHE TOTAL NO OF WORDS AFTER SWAPING IS %d\n\n",c1);
getch();
OUTPUT :
ENTER THE STRING: KAMLESH D MENGAR
THE TOTAL NO OF BEFORE SWAPPING 3
AKLMSE H DEMGNRA
THE TOTAL NO OF AFTER SWAPPING 3
Write a C program to compute the value of a sine wave from 0 to 2P with an increment of 0.1 radians. #include stdio.h #include math.h #define pi 3.1415927 void main() { c
A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation.
Project Description: I am seeking a developer who can start an app from scratch and get it delivered to me as soon as possible. It is a little android based app. A background on
C Program for SORTING OF LONG WORD WITH ONE STRING #include stdio.h> #include conio.h> #include string.h> void main() { char n[50],c[25][25];
should i put define constant and memory constant in my flowchart? the other one, how to draw flowchart for break and continue statement?
Given a string, print all possible palindromic partitions using recursion
Write a function that calculates the number of elapsed days between two dates. For example the days between Feb 3, 1970 and June 21, 1980? Becareful for the Leap year.
code of this game
write a c program chat illustrates the creation of child process using fork system call. One process finds sum of even series and other process finds sum of odd series.
Bubble sort C program: Write a program to define a bubble sort. void main() { clrscr(); int a[100],ch,n; cout cin>>n; for (int i=0;i
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