implement NAND gate logic in C code without using any
bitwise operatior.
Answers were Sorted based on User's Feedback
Answer / laxmi bose
#include<stdio.h>
main()
{
int a,b;
scanf("%d%d",&a,&b);
if(a==0||b==0)
{
printf("1");
}
else
{
printf("0");
}
| Is This Answer Correct ? | 42 Yes | 13 No |
Answer / senthil.cp
NAND using Bitwise operators
c = ~(a & b) OR
c = ~a | ~b
NAND without using bitwise operators
c = (0xFF - a) + (0xFF - b)
| Is This Answer Correct ? | 35 Yes | 16 No |
What is the difference between GETS();AND SCANF();
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What is the benefit of using #define to declare a constant?
program to print circle structure
what is the difference between NULL('\0') and 0?
What are local variables c?
write a program wch produces its own source code aas its output?
why we use pointer in c
How we can insert comments in a c program?
In C program, at end of the program we will give as "return 0" and "return 1", what they indicate? Is it mandatory to specify them?
Explain the difference between null pointer and void pointer.
What are dynamically linked and statically linked libraries?