ABCDCBA
ABC CBA
AB BA
A A




Answers were Sorted based on User's Feedback



ABCDCBA ABC CBA AB BA A A..

Answer / vignesh1988i

good question it is :

#include<stdio.h>
#include<conio.h>
void main()
{
int m;
char n,o;
printf("enter the no. of lines :");
scanf("%d",&m);
o='A';
for(int i=0;i<m;i++)
{
n='A';
for(int j=0;j<(m-i);j++)
printf("%c",n++);
for(j=0;j<i;j++)
printf(" ");
for(j=0;j<(m-(i+1));j++)
{
if(j==0||j==1)
{
n='A'+(m-2);
printf("%c",n);
}
else
printf("%c",--n);
}
printf("\n");
}
getch();
}

thnak u

Is This Answer Correct ?    9 Yes 11 No

ABCDCBA ABC CBA AB BA A A..

Answer / aarti

a.b.c=c.b.a this statement should be inside any program ang
this should give real meaning

Is This Answer Correct ?    0 Yes 2 No

ABCDCBA ABC CBA AB BA A A..

Answer / mathu

import java.io.*;

class MainAlpha{
public static void main(String args[])
{
for(int i=65;i<=67;i++){
System.out.printf("%c",i);
System.out.printf("\t");
}
System.out.print("");
for(int j=66;j>=65;j--){
System.out.printf("%c",j);
System.out.printf("\t");
}
System.out.println("");


for(int i=65;i<=66;i++){
System.out.printf("%c",i);
System.out.printf("\t");
}
System.out.print("\t");

for(int j=66;j>=65;j--){
System.out.printf("%c",j);
System.out.printf("\t");
}

System.out.println("");


for(int i=65;i<=65;i++){
System.out.printf("%c",i);
System.out.printf("\t");
}
System.out.print("\t");
System.out.print("\t");
System.out.print("\t");

for(int j=65;j>=65;j--){
System.out.printf("%c",j);
System.out.printf("\t");
}

}

}

Is This Answer Correct ?    2 Yes 4 No




ABCDCBA ABC CBA AB BA A A..

Answer / notgate779

http://allinterview.com/showanswers/89174.html
<a
href="http://allinterview.com/showanswers/89174.html">click</a>

Is This Answer Correct ?    0 Yes 3 No

Post New Answer



More C Interview Questions

int j =15,i; for (i=1; 1<5; ++i) {printf ("%d%d ",j,i); j = j-3; }

2 Answers  


what is the differnce between AF_INET and PF_INET?

5 Answers   Wipro, Systems Plus,


what is c

4 Answers  


out put of printf(ā€œ%dā€,printf(ram));

5 Answers  


What does extern mean in a function declaration?

4 Answers  






#include<stdio.h> #include<conio.h> void main() { clrscr(); int a=0,b=0,c=0; printf("enter value of a,b"); scanf(" %d %d",a,b); c=a+b; printf("sum is %d",c); getch(); }

2 Answers  


what is pointer ?

10 Answers   Kernex Micro Systems,


without a terminator how can we print a message in a printf () function.

7 Answers   NIIT,


code for quick sort?

0 Answers  


Write a program that accepts a string where multiple spaces are given in between the words. Print the string ignoring the multiple spaces. Example: Input: ā€œ We.....Are....Student ā€œ Note: one .=1 Space Output: "We Are Student"

6 Answers   IBM,


Print all the palindrome numbers.If a number is not palindrome make it one by attaching the reverse to it. eg:123 output:123321 (or) 12321

7 Answers   HCL,


There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.

1 Answers   HCL, iGate,






Categories