what is the difference between auto and static keywords

Answer Posted / dr. guruprasad

auto and static are both storage classes.
if a variable is declared as auto - then the life of it will be only till function block.
if static - then value persists between various function call. Life till program ends.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is time complexity c?

568


In a switch statement, explain what will happen if a break statement is omitted?

637


How is actual parameter different from the formal parameter?

591


What is difference between arrays and pointers?

580


What is the time and space complexities of merge sort and when is it preferred over quick sort?

676






What does c mean in standard form?

597


Is anything faster than c?

585


What is use of pointer?

587


What do you mean by a sequential access file?

627


Where are c variables stored in memory?

597


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1252


What is function prototype?

609


Explain what does a function declared as pascal do differently?

640


Why is python slower than c?

602


Can an array be an Ivalue?

664