SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to print months
C program to print months
Output:
Enter the number of the month:
5
The month for the entered code is May
Implementation:
#include
char *months[]={"","January","February","March","April","May","June","July" "August","September","October","November","December"}; int main(void) { int mcode; printf("Enter the number of the month:\n"); scanf("%d",&mcode); printf("The month for the entered code %d is %s",mcode,months[mcode]); return 0; }
PREVIOUS
NEXT
HOME