#define min((a),(b)) ((a)<(b))?(a):(b)
main()
{
int i=0,a[20],*ptr;
ptr=a;
while(min(ptr++,&a[9])<&a[8]) i=i+1;
printf("i=%d\n",i);}
Answer Posted / guest
5
| Is This Answer Correct ? | 10 Yes | 4 No |
Post New Answer View All Answers
What are the 4 types of programming language?
What is the use of c language in real life?
while initialization of array why we use a[][2] why not a[2][]...?
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
Difference between pass by reference and pass by value?
What is %s and %d in c?
how many errors in c explain deply
Write a program for finding factorial of a number.
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
Explain what header files do I need in order to define the standard library functions I use?
How we can insert comments in a c program?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
How can I generate floating-point random numbers?