Explain is it better to bitshift a value than to multiply by 2?
Answer / Sonmati Gupta
Bitshifting can be more efficient than multiplication by 2 for integer arithmetic operations in C, as shifting requires fewer CPU cycles compared to multiplication. However, this advantage only applies when working with powers of 2 and can vary based on the specific hardware and compiler optimizations.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is floating point exception error? And what are different types of errors occur during compile time and run time? why they occur?
implement general tree using link list
What is a 'null pointer assignment' error?
Explain how do you sort filenames in a directory?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?
What are conditional operators in C?
write a program to produce the following output; ABCDEFGFEDCBA ABCDEF FEDCBA ABCDE EDCBA ABCD DCBA ABC CBA AB BA A A
17 Answers ABC, College School Exams Tests,
helllo sir give me some information of the basic information the c as printf ,scanf , %d ,%f and why is the main use of these.
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
how to print the character with maximum occurence and print that number of occurence too in a string given ?
What are the advantages of c preprocessor?