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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   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
the number 138 is called well ordered number because the
three digits in the number (1,3,8) increase from left to right
(1<3<8). the number 365 is not well ordered coz 6 is larger
than 5.
write a program that wull find and display all possible
three digit well ordered numbers.

sample:
123,124,125,126,127,128,129,134
,135,136,137,138,139,145,146,147
148
149,156.......789
 Question Submitted By :: Hmmm
I also faced this Question!!     Rank Answer Posted By  
 
  Re: the number 138 is called well ordered number because the three digits in the number (1,3,8) increase from left to right (1<3<8). the number 365 is not well ordered coz 6 is larger than 5. write a program that wull find and display all possible three digit well ordered numbers. sample: 123,124,125,126,127,128,129,134 ,135,136,137,138,139,145,146,147 148 149,156.......789
Answer
# 1
for (int i=1; i<8; i++)
   for (int j=i; j<9; j++)
      for (int k=j; k< 10; k++)
          printf("%d\n", i*100+j*10+k);
 
Is This Answer Correct ?    2 Yes 5 No
Goloap
 
  Re: the number 138 is called well ordered number because the three digits in the number (1,3,8) increase from left to right (1<3<8). the number 365 is not well ordered coz 6 is larger than 5. write a program that wull find and display all possible three digit well ordered numbers. sample: 123,124,125,126,127,128,129,134 ,135,136,137,138,139,145,146,147 148 149,156.......789
Answer
# 2
for(int i=0;i<8;i++)
    for(int j=i+1;j<9;j++)
        for(int k=j+1;k<10;k++)
            printf("%d\t", i*100+j*10+k);
 
Is This Answer Correct ?    1 Yes 5 No
Santosh Kumar
 
 
 
  Re: the number 138 is called well ordered number because the three digits in the number (1,3,8) increase from left to right (1<3<8). the number 365 is not well ordered coz 6 is larger than 5. write a program that wull find and display all possible three digit well ordered numbers. sample: 123,124,125,126,127,128,129,134 ,135,136,137,138,139,145,146,147 148 149,156.......789
Answer
# 3
#include<stdio.h>
  int main(){
          int i,j,k;
          for (i=1; i<8; i++)
                  for (j=i+1; j<9; j++)
                          for (k=j+1; k< 10; k++)          
                       printf("%d\n", i*100+j*10+k);
  }
 
Is This Answer Correct ?    3 Yes 0 No
Sm1
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Every time i run a c-code in editor, getting some runtime error and editor is disposing, even after reinstalling the software what may be the problem?  2
Explain following declaration int *P(void); and int (*p)(char *a);  2
difference between semaphores and mutex?  1
Go through the following code sinippet char a[20]; a="Hello Orcale Test"; will this compile? Oracle3
write a program to generate 1st n fibonacci prime number  1
What is alloca() and why is its use discouraged?  1
c programming of binary addition of two binary numbers  1
Write a program to interchange two variables without using the third variable? Accenture11
where does malloc() function get the memory?  1
please give me some tips for the selection in TCS. TCS3
How can I read a directory in a C program? Wipro1
how to find out the union of two character arrays?  1
pick out the odd one out of the following a.malloc() b.calloc() c.free() d.realloc() TCS1
Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line. Subex2
the operator for exponencation is a.** b.^ c.% d.not available TCS4
write the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.  4
Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list? Oracle1
How can I allocate arrays or structures bigger than 64K?  4
write a program that print itself even if the source file is deleted?  1
a=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6 TCS5
 
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