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 gets() function?
Explain built-in function?
what is constant pointer?
What are the types of assignment statements?
What is the use of structure padding in c?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
What is the maximum length of an identifier?
what is difference between ++(*p) and (*p)++
17 Answers Accenture, HCL, IBM,
What is the size of array float a(10)?
du u know test pattern for robosoft? Plz share
1 Answers RoboSoft, TATA, Wipro,
What is 2c dna?
How can I make a program in c to print 'Hello' without using semicolon in the code?
9 Answers C DAC, Practical Viva Questions,