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
What are register variables? What are the advantage of using register variables?
What is #error and use of it?
What is data types?
What does %2f mean in c?
What is the best organizational structure?
Explain what are its uses in c programming?
Why is event driven programming or procedural programming, better within specific scenario?
What is the size of empty structure in c?
What’s the special use of UNIONS?
What is the use of a semicolon (;) at the end of every program statement?
Can you apply link and association interchangeably?
When do we get logical errors?
How can you read a directory in a C program?
largest Of three Number using without if condition?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above