Answer Posted / vatsava
scope of the auto keyword is local to the block in which
the variable is defined.
for ex:
main()
{
auto int i=1;
{
auto int i=2;
{
auto int i=3;
printf("%d",i);
}
printf("%d",i);
}
printf("%d",i);
}
the op would be 321
Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What is the data segment that is followed by c?
What are local static variables? How can you use them?
Explain what is the difference between functions getch() and getche()?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
how we can make 3d venturing graphics on outer interface
main() { printf("hello"); fork(); }
plz let me know how to become a telecom protocol tester. thank you.
What is the process of writing the null pointer?
What is the difference between if else and switchstatement
What are the advantages of using macro in c language?
Explain what does it mean when a pointer is used in an if statement?
What are the different types of constants?
Describe newline escape sequence with a sample program?
How would you rename a function in C?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none