Write a program in C for showing working of different
logical operator in C.
Your program should guide users with proper message/menu on
the console.
Answer Posted / rajiv
int a,b,c,d,m,t;
float x,y,j,k;
scanf("%d\n%d\n%d\n%d\n%d\n%d\n",&a,&b,&c,&d,&m,&t);
scanf("%f\n%f\n%f\n%f\n",&x,&y,&j,&k);
if((a>b && c<d)||(x>y && j<k)||(m!=t))
printf("its demo of logical operator");
else
printf("logical error is there in program");
Is This Answer Correct ? | 42 Yes | 16 No |
Post New Answer View All Answers
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
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 ].
What is typeof in c?
What is the function of volatile in c language?
What are pointers?
What is indirection? How many levels of pointers can you have?
How does sizeof know array size?
What are lookup tables in c?
What are inbuilt functions in c?
What are register variables? What are the advantage of using register variables?
Is there sort function in c?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
Explain the properties of union. What is the size of a union variable
Write the Program to reverse a string using pointers.
What are the 4 types of organizational structures?