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
What are the benefits of c language?
What will the preprocessor do for a program?
What are structures and unions? State differencves between them.
Differentiate fundamental data types and derived data types in C.
How do I copy files?
Is array name a pointer?
What are integer variable, floating-point variable and character variable?
Explain the process of converting a Tree into a Binary Tree.
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What is #define?
How can you find the day of the week given the date?
Write program to remove duplicate in an array?
Differentiate between the expression “++a” and “a++”?
How will you find a duplicate number in a array without negating the nos ?
What is scope rule in c?