Write a program in C to print month in word.
#include<stdio.h> #include<string.h> void main() { int m; char str[20][20]={"January","February","March","Aprail","May","June","July","August","September","October","November","December"}; printf("Enter the month in number:-"); scanf("%d",&m); printf("Month in word is %s",str[m-1]); }
Output:
Related programs:
- 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 find the number of characters in given string.
- Write a program in C to find place of given character in given word.
0 Comments