ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
ABCDCBA
ABC CBA
AB   BA
A     A
 Question Submitted By :: Rahul030691
I also faced this Question!!     Rank Answer Posted By  
 
  Re: ABCDCBA ABC CBA AB BA A A
Answer
# 1
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 ?    2 Yes 1 No
Vignesh1988i
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
1. Duplicate the even numbers. -1 Sample I/O Array1:- 4,2,24,3,22 Updated Array:- 4,4,2,2,24,24,3,22,22 2. Reverse the array in a region - 1 Sample I/O Array1:- 4,2,24,3,22,41,21 Enter Region:- 2,5 Update Array:-4,41,22,3,24,2,21 3. Store first the even digits in an array and then odd digits in same array -2 Sample I/O Array1:- 4,2,24,3,22,41,21 Array 2:- 4,2,2,4,2,2,4,2,3,1,1 4. Store the count of the digits in all numbers in an array and print the count. -2 Sample I/O Array1:- 4,2,9,3,7,41,28 Array 2:- 0,1,1,1,2,0,0,1,1,1 1-1;2-1;3-1;4-2;7-1;8-1;9-1 5. Store all palindrome numbers in to another array -2 Sample I/O Array1:- 4,22,9,313,7,141,28 Array 2:- 4,22,9,313,141 6. Arrange the array in such a way that odd numbers come first and then even numbers -1 Sample I/O Array1:- 4,22,9,313,7,141,28 Update Array1:- 9,313,7,141,4,22,28 7. Store into another array by inserting it in the right place - 2 Sample I/O Array1:- 4,22,9,313,7,141,28 Array2:- 4 /4,22 /4,9,22 /4,9,22 ,313 /4,7,9,22 ,313 /4,7,9,22 ,141,313 / 4,7,9,22,28 ,141,313 8. Merge two sorted arrays in a sorted fashion - 3 Sample I/O Array 1:- 3,6,7,9,11,16 Array 2:- 1,2,5,7,20 Array 3:- 1,2,3,5,6,7,9,11,16,20 9. Upadte the array so that an array element is followed by its revere - 1 Sample I/O Array 1:- 13,63,74,9,11,16 Updated Array 1:- 13,31,63,36,74,47,9,9,11,11,16,16 10.Spread the digits of the array in the same array. -1 Sample I/O Array 1:- 13,63,74,9,11,16 Updated Array 1:-1,3,6,3,74,9,1,1,1,6 11.Shift the boundary of array to have only 2 digit numbers. Sample I/O Array 1:- 139,643,74,9,101,126 Updated Array 1:- 13,96,43,74,91,11,26 12.Print the largest occuring digit in an array of N numbers. Sample I/O Array 1:- 13,63,74,9,11,16 1 occurs most. Intel2
Why doesn't the code "a[i] = i++;" work?  4
find largest element in array w/o using sorting techniques. Zycus-Infotech2
how many argument we can pas in in a function CTS20
write a program to print sum of each row of a 2D array.  2
who is the founder of c HP9
What does extern mean in a function declaration?  2
HOW TO ANSWER IF ASKED " WHAT KIND OF A PERSON ARE YOU?" I NEED AN ANSWER THAT IMPRESS THE INTERVIEWER  2
write a addition of two no. program with out using printf,scanf,puts .  3
void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case TCS7
design and implement a program that reads floating-points numbers in a sentinel-controlled loop until the user terminates the program by entering zero.your program should determinate and print the smallest,largest and average of the supplied numbers.  1
Write a program to print all the prime numbers with in the given range ABC1
C passes By value or By reference? Geometric-Software5
Unsigned char c; for ( c=0;c!=256;c++2) printf("%d",c); No. of times the loop is executed ? Mascot3
write a programe returns the number of times the character appears in the string  1
How can we open a file in Binary mode and Text mode?what is the difference? PanTerra1
difference between my-strcpy and strcpy ? Geometric-Software3
What character terminates all strings composed of character arrays? 1) 0 2) . 3) END  3
what is diff between localstatic and globalstatis variable possible 2 use in another file...? HCL2
what is the output for the code : main() { int i,j; printf("%d %d ",scanf("%d%d",&i,&j)); } Infosys15
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com