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
I have a varargs function which accepts a float parameter?
What are the differences between new and malloc in C?
Why is c faster?
Are enumerations really portable?
using for loop sum 2 number of any 4 digit number in c language
What is multidimensional arrays
Describe explain how arrays can be passed to a user defined function
What’s the special use of UNIONS?
Why do we need volatile in c?
When the macros gets expanded?
What is difference between structure and union in c?
What is the difference between #include
What is the default value of local and global variables in c?
What is anagram in c?
How can I read a binary data file properly?