What is the difference between: x=a+b+c+d; and
x=SUM(a,b,c,d);?sas

Answers were Sorted based on User's Feedback



What is the difference between: x=a+b+c+d; and x=SUM(a,b,c,d);?sas..

Answer / tathagata

x=a+b+c+d will result in a missing value if any one of the
value in a,b,c or d is missing.
x=sum(a,b,c,d) will give the sum assuming the missing value
as '0'

Is This Answer Correct ?    22 Yes 0 No

What is the difference between: x=a+b+c+d; and x=SUM(a,b,c,d);?sas..

Answer / mohana priya.m

x=a+b+c+d;->The integer value gets stored in the value x.
x=sum(a,b,c,d);->the return value of the function sum
(a,b,c,d) gets stored in the value x.

Is This Answer Correct ?    9 Yes 1 No

What is the difference between: x=a+b+c+d; and x=SUM(a,b,c,d);?sas..

Answer / mohana priya.m

x=a+b+c+d --------> This will add the values of a,b,c and d
and finally assign the resulted value into x.


x=sum(a+b+c+d) ---> This will call the library procedure
named sum() in-order to calculate the sum of a,b,c and d.
Both will results in same answer

Is This Answer Correct ?    7 Yes 2 No

What is the difference between: x=a+b+c+d; and x=SUM(a,b,c,d);?sas..

Answer / inbee

X=a+b+c+d > it is inline case. The + operator is overloaded
such a way the right side object's value will be added with
the left one and goes on. As is is a inline call the
execution of this statement is faster.

X = sum(a+b+c+d) > here the compiler need a switch to the
location in the memory where this library procedure is
written. And once the whore procedure get execute the
execution control need to shift back to the line. So it is
time consuming task. Also the data type of 'x' depends on
the return type of the sum().

Is This Answer Correct ?    3 Yes 0 No

What is the difference between: x=a+b+c+d; and x=SUM(a,b,c,d);?sas..

Answer / nikita

In x=a+b+c+d we get sum of four integer, but x=sum(a,b,c,d) not get sum of four integer.

Is This Answer Correct ?    4 Yes 11 No

Post New Answer

More Programming Languages AllOther Interview Questions

what are methods we have in connection pooling

1 Answers   Wipro,


How will you prove that java swing is multithreaded?

0 Answers  


£¢®£ž›;=9:B9<::C = ADITHI HOW TO GET?

0 Answers  


converting 41.685 to binary

1 Answers   Hughes,


how MATLSB software suitable for electrical branch? which tools are useful??

1 Answers  






Tell me the jobs for the MCA Fresher in delhi, Noida..

0 Answers  


if try is followed by finally block what happen to exception occured in try block

3 Answers   Professional Access,


why we use abstract word in abstract window toolkit in java language.

0 Answers   Infosys,


can we extend a class having only one parameterised constructor.Suggest the process to do it.

0 Answers   Zensar,


I am work in it aompenei

0 Answers   Access Healthcare,


I need to fetch all rows from the table based one field value in the table and later do a condition check if the condition is true I will have to move all the rows present in the data base to output file one else if the condition is not satisfied then move all the records of that field value into another file .Please let me know how to do that

0 Answers  


what is different betweet class and interface in java?

2 Answers   Microsoft, Sun Microsystems,


Categories