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
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 |
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 |
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 |
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 |
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What is indirection? How many levels of pointers can you have?
#define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
14 Answers CDAC, GATE, NDS, TCS,
What is the use of the sizeof operator?
diff .between strcture and union
What is data structure in c and its types?
What are the rules for the identifier?
how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?
WHAT IS RTGS N MINIMUM AMT TO B TRANSFERD N WHAT R THE CHARGES ON MINIMUM AMT N IN WHICH BANK WE CAN DO IT?
Reverse the part of the number which is present from position i to j. Print the new number. eg: num=789876 i=2 j=5 778986
program to get the remainder and quotant of given two numbers with out using % and / operators?
10 Answers College School Exams Tests, IBM,
Write a c program using for loop in switch case?