The ones who are crazy enough to think they can change the world are the ones who do.- Steve Jobs
In most of the MNC interview questions such as in Zoho interview questions, IVTL Infoview interview questions, Amazon interview questions, Google interview questions, Infosys interview questions and even in Voonik interview questions, We come across Alphabetic pattern questions with a probability of 1:5. We provide you a most commonly asked alphabetic pattern question for your interview preparation using C programming.
Lets code a C program to print following alphabetic pattern to have some fun.
We challenge you, the programmer to do the following alphabet pattern using C programming
#include <stdio.h> int main() { int a, i; for(a = 65;a <= 69;a++) { for(i = 65;i <= a;i++) { printf("%c ", i); } printf("\n"); } return 0; }
A A B A B C A B C D A B C D E
Here we make use of ASCII value to print the above alphabetic pattern. The ASCII value of
Here, the inner for loop takes care of both the alphabets to be printed and a way to print the alphabets generated by itself. Here the Purpose of outter for loop is to set destination alphabet for every new line.
We may make mistakes(spelling, program bug, typing mistake and etc.), So we have this container to collect mistakes. We highly respect your findings.
© Copyright 2019