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

c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

613


What is pointer and structure in c?

574


Why we use stdio h in c?

580


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include #include #include #include int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

1620


i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none

644






What is volatile c?

525


what value is returned to operating system after program execution?

1606


Explain the array representation of a binary tree in C.

728


What is a pointer in c plus plus?

696


What is storage class?

654


Differentiate between declaring a variable and defining a variable?

607


List the different types of c tokens?

627


A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?

1511


What is a structural principle?

640


Which node is more powerful and can handle local information processing or graphics processing?

829