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 is the basis for selection of arrays or pointers as data structure in a program
What is actual argument?
What are comments and how do you insert it in a C program?
write a program to create a sparse matrix using dynamic memory allocation.
find out largest elemant of diagonalmatrix
Why calloc is better than malloc?
How do you generate random numbers in C?
Differentiate abs() function from fabs() function.
What are global variables and explain how do you declare them?
How can you return multiple values from a function?
What is the best way of making my program efficient?
What is non linear data structure in c?
What is a lvalue
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
What are reserved words with a programming language?