-->



Honeywell Placement Paper


1 Arrange Them in the order of space complexity
Merge sort, quick sort, heap sort

2 Void main()
{
complete=10;
complete1=11;
if(complete=12)
{
printf ("hi");
}
else
{
printf("hello");
}
printf("%d %d ",complete,complete1);
}
o/p- hi 12 11

3 How many times in a day the hr. & min. hands of a clock are in straight line.

4 How many times in a day the hr. & min. hands of a clock meet each other.

5 Structure A
{
int x;
float y;
}a;
union B
{

int p;
float ;
}b;
choices: 1.all the times a & b have same size, 2. such declaration r not possible
3. a & b have same size.4 ......

6 Write switch-case syntax in C.

7. What is the difference between process and threads?

8. Write a program to add two complex number using structure in C which takes input and print output in Main().
Answer to Question 3::
//Addition of Two complex number using structure
#include<stdio.h>
#include<conio.h>
struct comp
{
int real;
int imag;
} s,t;
void Add(struct comp *, struct comp *);
void main()
{
clrscr();
printf("Enter the two complex numbers ");
printf("(x1, y1) and (x2, y2) ");
scanf("%d%d%d%d", &s.real, &s.imag, &t.real, &t.imag);
Add(&s, &t);
printf(" Sum of two complex number is:%d+i%d ", s.real, s.imag);
getch();
}
void Add( struct comp *s, struct comp *t )
{
s->real = s->real + t->real;
s->imag = s->imag + t->imag;
}