In the following control structure which is faster?
1.Switch
2.If-else
and which consumes more memory?
Answer Posted / battini.laxman
switch is faster because when in nested if condition has to
check for each time. where as in switch it diectly check
only labels.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Do you know the purpose of 'register' keyword?
Write a program to generate the Fibinocci Series
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
Why is sprintf unsafe?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
Why is c called a structured programming language?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
Explain how can I write functions that take a variable number of arguments?
What is huge pointer in c?
Explain how does free() know explain how much memory to release?
What is the difference between array and structure in c?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
Explain bitwise shift operators?
How old is c programming language?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset