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
In C, What is the #line used for?
What is restrict keyword in c?
What are the types of assignment statements?
Explain continue keyword in c
How many types of sorting are there in c?
What do you know about the use of bit field?
Why is sizeof () an operator and not a function?
What is ctrl c called?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
What is the Purpose of 'extern' keyword in a function declaration?
There seem to be a few missing operators ..
What are extern variables in c?
What is boolean in c?
What is the difference between array and pointer?
What is getch() function?