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 |
Write the program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.
What is null pointer constant?
Explain how do you override a defined macro?
What is a global variable in c?
What are the rules for identifiers in c?
How many types of linked lists what are they? How many types of data structures?
18 Answers BSNL, Pivotal Software,
What happens if you free a pointer twice?
Explain the priority queues?
Explain what are the __date__ and __time__ preprocessor commands?
What is local and global variable in c?
c language interview questions & answer
What is dynamic variable in c?