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.
Answer Posted / 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 View All Answers
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What are identifiers in c?
Why use int main instead of void main?
Can 'this' pointer by used in the constructor?
What are the advantages of c preprocessor?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
How do you do dynamic memory allocation in C applications?
What are control structures? What are the different types?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
Why C language is a procedural language?
What is operator precedence?
What are the complete rules for header file searching?
Is there a built-in function in C that can be used for sorting data?
What is the use of volatile?