Write a program in C to find place of given character in given word.
#include<stdio.h> #include<conio.h> #include<string.h> void main() { char str[100],ch; int i,count=1; clrscr(); printf("Enter a string:-"); gets(str); printf("Enter a charater:-"); scanf("%c",&ch); for(i=0;str[i]!='\0';i++) { if(str[i]==ch) break; else count++; } printf("%c is in %s word on %d place .",ch,str,count); getch(); }
- Write a program in C to read multiple string and then print.
- Write a program in C to find the number of characters in given string using pointer.
- Write a program in C to covert small letter to capital letter.
- Write a program in C to covert capital letter to small letter.
- Write a program in C to print month in word.
- Write a program in C to find the number of characters in given string.
0 Comments