Month: April 2017

20
Apr
2017

Logic to Find First and Last Digit

Last Digit: #include<stdio.h> int main(){ int num,lastdigit; printf(“enter any number:”); scanf(“%d”,&num); lastdigit=num%10; printf(“lastdigit = %d”,lastdigit); return 0;…

19
Apr
2017

String Frequency Count

code: simple code: #include<stdio.h> int main() { char str[300],ch; int i,frequency=0; printf(“enter string:”); gets(str); printf(“enter character:”); scanf(“%c”,&ch);…

19
Apr
2017

String Palindrome Problem

My Own Logic: #include<stdio.h> int main() { char str[200]; int i,j; gets(str); for(i=0;str[i]!=’\0′;i++); for(j=0;j<i;j++) { if(str[0]==str[i-1]){ printf(“Palindrome\n”);…

19
Apr
2017

Count word

Problem from 101cproblems.com: Write a program which will take a sentence as input and tell us how…

18
Apr
2017

String Problem: Uppercase to Lowercase, Lowercase to Uppercase

Problem 70: Case Fix You are given a string mixed with uppercase and lowercase letters . Your…

18
Apr
2017

String Problem: ASCII table related

Problem: Write a program which takes a string of alphabet as input and replace all the characters with…