instanceof java
Posts: 576
Nickname: instanceof
Registered: Jan, 2015
instanceof java is a java related one.
C program to display characters from a to z using loop
Posted: May 20, 2017 5:21 AM
This post originated from an RSS feed registered with Java Buzz
by instanceof java.
Original Post: C program to display characters from a to z using loop
Feed Title: Instance Of Java
Feed URL: http://feeds.feedburner.com/blogspot/TXghwE
Feed Description: Instance of Java. A place where you can learn java in simple way each and every topic covered with many points and sample programs.
Latest Java Buzz Posts
Latest Java Buzz Posts by instanceof java
Latest Posts From Instance Of Java
Advertisement
C program to display characters from a to z using loop. We can print all alphabets starting from A to Z using for loop. Take a char variable and using for loop iterate it from A to Z. Let us see an Example C program to print A to Z using for loop.
Program #1: Write a C program to print or display characters from A to Z using for loop. #include <stdio.h> int main() { char c; for(c = 'A'; c <= 'Z'; ++c) printf("%c ", c); return 0; } Output: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Program #2: Write a C Program to Display English Alphabets in Uppercase and Lowercase #include <stdio.h> int main() { char c; printf("Enter u to display alphabets in uppercase. And enter l to display alphabets in lowercase: "); scanf("%c", &c); if(c== 'U' || c== 'u') { for(c = 'A'; c <= 'Z'; ++c) printf("%c ", c); } else if (c == 'L' || c == 'l') { for(c = 'a'; c <= 'z'; ++c) printf("%c ", c); } else printf("Error! You entered invalid character."); getch(); } Output:
Read: C program to display characters from a to z using loop