Explain what is the most efficient way to store flag values?



Explain what is the most efficient way to store flag values?..

Answer / Satyaprakash Singh

In C, flags can be efficiently stored using enumerations or bitfields. Enumerations allow you to define a sequence of named integer constants, while bitfields enable you to represent multiple Boolean variables within a single memory location.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What are c header files?

1 Answers  


#include<string.h> void main() { String s1[]={"swathi"}; string s2[]={"maddimsetti"}; s1[]=s[]; printf("%s",s1[]); }

3 Answers   IBM,


Why void is used in c?

1 Answers  


can u write a program in C, which does not use = (eqaul)or any arithmatic assignment(like -=,+=,*= etc) operator to swap to number?

2 Answers  


Is main() function predfined or userdefined?

11 Answers  


Is null a keyword in c?

1 Answers  


which of the following statements is incorrect a.typedef struct new{ int n1; char n2; } DATA; b.typedef struct { int n3; char *n4; }ICE; c.typedef union { int n5; float n6; } UDT; d.#typedef union { int n7; float n8; } TUDAT;

5 Answers   Assurgent, TCS,


what is c language.

3 Answers  


How can I do serial ("comm") port I/O?

1 Answers   Celstream,


What are c identifiers?

1 Answers  


The file stdio.h, what does it contain?

1 Answers  


difference between spiral and waterfall model

1 Answers  


Categories