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 / chauhan varsha

#include<stdio.h>
void main()
{
int a=5,b=8,c=9,d=2;
clrscr();
if((a==b)&&(a==c))
{
printf("value is same. check 3 values using logical
operator..");
}
else if((a!>b) || (a!>c))
{
printf("value of a is not grater from b & c check
using logical operator or & not...");
}
getch();
}

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to reverse a given number in c?

581


What is the difference between text and binary i/o?

579


Where are c variables stored in memory?

584


How can a program be made to print the name of a source file where an error occurs?

711


What is hungarian notation? Is it worthwhile?

671






What are the different categories of functions in c?

631


What are the parts of c program?

617


Explain union.

625


What is sizeof in c?

556


What is wrong with this initialization?

574


Ow can I insert or delete a line (or record) in the middle of a file?

560


What is the purpose of type declarations?

665


Compare interpreters and compilers.

628


What is the size of enum in bytes?

572


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

2317