SET OF PROGRAMS

This blog provided "C" programs for beginners. Providing c programs for students.enjoy this blog.this blog include many c programs for engineering students, IT engineering students and programmers this blog is very useful.this blog post daily 1-5 programs for you.this programs use full for devlop games devlops application and much more. This blog programs useful for projects because all programs post with explanations.

Search Bar

Ads Here

Friday, 4 May 2018

C program for print a to z alphabets (small)


#include<stdio.h>
main()
{
  int i;
  for(i=97;i<=122;i++)
  {
    printf("%c",i);
  }
   printf("\n");
}
Output:






Explanation:
  1. Here we declared an integer i.
  2. Now this program is same as printing numbers from 97 to 122.
  3. But if you can remember the "ASCII" values of 97 which resembles 'a' and 122 which resembles 'z' as in ascii sheet. To refer ASCII Values click here.
  4. So instead of "%d" if we use "%c" it is converted to ascii value.

No comments:

Post a Comment