Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to print all the 26 alphabets in this order in C.

AbCdEfGh.....

it should print dynamically from a to z and do not print
this using pgm like this print("Ab......");

Use loops or anything to print all alphabets

Answer Posted / nitin garg

#include<stdio.h>
#include<conio.h>
#include<math.h>

int main(){

char ch[26];
int a=65,b=98;
for(int i=0;i<26;i++)
{
ch[i]=a;
printf("%c ",ch[i]);
i++;
a=a+2;
ch[i]=b;
printf("%c ",ch[i]);
b=b+2;

}
getch();
return(0);
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Lists the benefits of c programming language?

1138


Explain zero based addressing.

1024


What are the advantages of external class?

1062


How can I find the modification date and time of a file?

1083


What is the use of sizeof?

1013


What is volatile variable in c?

1089


Do pointers need to be initialized?

1078


Why main function is special give two reasons?

1540


What is difference between static and global variable in c?

1046


Are the variables argc and argv are always local to main?

1020


What is a structural principle?

1162


What is wrong with this program statement?

1035


What does the format %10.2 mean when included in a printf statement?

1649


Explain what is wrong in this statement?

1120


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

2176