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 back slash character constants or escape sequence charactersavailable in c?
How reliable are floating-point comparisons?
What is switch in c?
What is difference between structure and union?
What is structure in c explain with example?
How to get string length of given string in c?
why return type of main is not necessary in linux
Differentiate abs() function from fabs() function.
What are operators in c?
What is the difference between procedural and declarative language?
What are structure members?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
Why structure is used in c?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
Explain high-order and low-order bytes.