GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 365 of 453    Print  
what is source code of this tringle

A
A N I
A N I R B
A N I R B A N
A N I R B A N P A
A N I R B A N P A U L

2)
A
N I R
B A N P A
3)
1
2 3 4
5 6 7 8 9


  
Total Answers and Comments: 4 Last Update: March 18, 2008     Asked by: Bunti12 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 31, 2007 06:32:38   #1  
kaushalgoa Member Since: December 2007   Contribution: 7    

RE: what is source code of this tringle A A N I A N I R B A N I R B A N
int main()
{
char str[20] "ANIRBANPAUL";
int x 0 y 0 z 0;

z strlen(str);

for(x 0; x < z; x+ 2)
{
for(y 0; y < x; y++)
{
printf(" c" str[y]);
}
printf("n");
}

}


 
Is this answer useful? Yes | No
March 14, 2008 05:16:19   #2  
amarendra.moharana Member Since: January 2008   Contribution: 12    

RE: what is source code of this tringle A A N I A N I R B A N I R B A N

Program-2 ANIRBANPA

Ans-2

Char A[12] ANIRBANPAUL ;

Static int k 0;

For (int i 0;I< strlen(A); I+ 2)

{

For(j 0;j< I;j++)

{

Printf( c A[k]);

K++;

}

//inner for loop

printf( n );

}

//outer for loop /

Program-3123456789

Ans-3

static int k 1;

for( int I 1; I< 5; I+ 2 )

{

for( int j 1; j< I;j++ )

{

printf( d k ); k++; }

//inner for loop

printf( n );

}//outer for loop


 
Is this answer useful? Yes | No
March 18, 2008 07:30:18   #3  
jeyaraj.ck Member Since: March 2008   Contribution: 4    

RE: what is source code of this tringle A A N I A N I R B A N I R B A N

3)
1
234
56789


#define MAX 9

int main()

{

int int_array[MAX] {1 2 3 4 5 6 7 8 9}; int i j k odd h 0;
for(k 0 i 0 odd 1; i<3; i++ k+ odd)

{

if(k! 0)

odd+ 2;

for(j k; (j<k+odd)&&(h<MAX);j++)

{

printf(" d " int_array[j]);

h++;

}

printf("backslashn");

}

getch();

}

//backslash is


 
Is this answer useful? Yes | No
March 18, 2008 07:35:43   #4  
jeyaraj.ck Member Since: March 2008   Contribution: 4    

RE: what is source code of this tringle A A N I A N I R B A N I R B A N

#define MAX 12

int main()

{

char name[MAX] "Bangalor";int i j k odd h 0;
for(k 0 i 0 odd 1; i<4; i++ k+ odd)

{

if(k! 0)

odd+ 2;

for(j k; (j<k+odd)&&(h<MAX);j++)

{

printf(" c " name[j]);

h++;

}

printf("Backslashn");

}

getch();

}




// Backslash is


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape