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

How are variables declared in c?

605


explain what are actual arguments?

641


How do I get an accurate error status return from system on ms-dos?

655


Can the size of an array be declared at runtime?

620


write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

2459






What is the right way to use errno?

629


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2309


how is the examination pattern?

1603


What are the benefits of c language?

653


find the sum of two matrices and WAP for it.

642


What is a program flowchart and how does it help in writing a program?

671


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

598


What is #line?

619


application attempts to perform an operation?

1499


Can a void pointer point to a function?

581