3. Write a c program to delete the all consonants from given string.
9. Write a c program to print the string from given character.
10. Write a c program to reverse a string
11. Reverse a string using recursion in c
12. String concatenation in c without using strcat
13. How to compare two strings in c without using strcmp
14. String copy without using strcpy in c
15. Convert a string to ASCII in c
10. Write a c program to reverse a string
11. Reverse a string using recursion in c
12. String concatenation in c without using strcat
13. How to compare two strings in c without using strcmp
14. String copy without using strcpy in c
15. Convert a string to ASCII in c

HI..this program is not giving any output..
ReplyDeleteplz check it
You have to include the header file coz string functions are being used.
ReplyDeleteneed fflush(stdin) n getchar() there.. n change into lower case right? please make a correction..
ReplyDeletehey this programm is not returning upper case .please correct it..
ReplyDeleteThis program doesn't convert into upper case while it converts only uppercase to lower case
ReplyDeletescanf statement does not contain &
ReplyDeleteHey! This doesn't convert lower case to upper case, it only convert upper case to lower case.please check it.
ReplyDeleteHEY!this programm is not returning upper case .please correct it..
ReplyDeleteHi ! What would be the program without using function strlen.
ReplyDeleteHy!I think this program is not correct.Please check it once.
ReplyDeletethe correct program is this without any error:-
ReplyDelete#include
#include
int main(){
char str[20];
int i;
printf("Enter any string->");
scanf("%s",&str);
printf("The string is->%s",str);
for(i=0;i<=strlen(str);i++){
if(str[i]>=65&&str[i]<=90)
str[i]=str[i]+32;
}
printf("\nThe string in uppercase is->%s",str);
return 0;
}
dont we have to use fflush(stdin) when we accept string????
ReplyDeleteinside the scnaf & then . it also not work.
ReplyDeletepls check it again.
create a function to change the case of alphebet
ReplyDeletecreate a function to find factorial of anumber
ReplyDeletecreate a function to the area of a triangle
ReplyDeleteGuys, It will just convert from Upper case to lower case !!! everything works perfectly
ReplyDeleteHope you don't mind, but I added to the program to do both upper and lower case.
ReplyDelete#include
int main(void){
char str[20];//intitializes string
int i = 0;
printf("Enter any letter");//asks for a letter
scanf("%s",&str);//scans for a letter
for(i=0;i<=20;i++)//for loop that continues to the last character of the string
{
if(str[i]>=65&&str[i]<=90)//if uppercase
str[i]=str[i]+32;//adds to character to change lower case
else if(str[i]>=97&&str[i]<+122)//if lowercase
str[i]=str[i]-32;//subtracts to change to uppercase
}
printf("\nThe opposite letter is->%s\n",str);//outputs the opposite letter
return (0);
}
no problem in the code.
ReplyDeleteThe statement in the final printf() should be "\nThe converted string in lower case is %s" so that the logic is correct :)
thanks boss i want this program only it works perfectly
ReplyDeleteWhat is the output of:
ReplyDeletemain()
{
printf(5+"Good Morning");
}
5GoodMorning
ReplyDeleteif we do string concatenation using + operator then both operands of + operator should be a string . so it make a whole string because here 5 which is an integer has been converted into string
ReplyDeleteits not working
ReplyDelete