create a C program that displays one z,two y's,three x's
until twenty six A's.
plzz answer i need it tomorrow.

Answers were Sorted based on User's Feedback



create a C program that displays one z,two y's,three x's until twenty six A's. plzz..

Answer / sujata

int Totchar_count =26;
int cur_postion= 26 ;
int diff=0;
char cur_char ='Z';
do
{
diff = (Totchar_count+1) -cur_postion;
while(diff >=1)
{
printf("%c",&c);
diff--;
}
cur_position--;
cur_char--;
}while(c !='Z'-Totchar_count);

Is This Answer Correct ?    1 Yes 1 No

create a C program that displays one z,two y's,three x's until twenty six A's. plzz..

Answer / d14bbl0

#include<stdio.h>

int main(){
int i,count;

for (i=0;i<26;i++){
for (count = 0;count<i;count++){
printf("%c",(char)('Z'-i));
}
}
return 0;
}

Is This Answer Correct ?    0 Yes 0 No

create a C program that displays one z,two y's,three x's until twenty six A's. plzz..

Answer / vadivelt

Qn seems to be not very clear.. Could u pls post it clearly
so that, can answer.

Is This Answer Correct ?    0 Yes 1 No

create a C program that displays one z,two y's,three x's until twenty six A's. plzz..

Answer / satya

#include<conio.h>
main()
{ int i,j;
char *ptr="z";
clrscr();
for(i=1;i<=26;i++)
{
for(j=1;j<=i;j++)
{
printf("%s",ptr);
}
--(*ptr);
printf("\n");
}
getch();



}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

What is the difference between near, far and huge pointers?

0 Answers  


main() { int i; printf("%d", &i)+1; scanf("%d", i)-1; }

1 Answers  


const char * char * const What is the differnce between the above tow?.

6 Answers   Ramco, TCS,


What is the maximum length of an identifier?

0 Answers  


What is a far pointer?What is the utility?

4 Answers  






hi , please send me NIC written test papers to sbabavalli@gmail.com

0 Answers   NIC,


Example of friendly function in c++

2 Answers  


Discuss the function of conditional operator, size of operator and comma operator with examples.

0 Answers   TCS,


Write a small C program to determine whether a machine's type is little-endian or big-endian.

5 Answers   nvidia,


Is struct oop?

0 Answers  


union { char ch[10]; short s; }test; test.s = 0xabcd; main() { printf("%d",ch[10]); }

3 Answers  


Can we initialize extern variable in c?

0 Answers  


Categories