what is volatile in c language?

Answer Posted / deep

consider this outside main()

int i=10;
int j = i + 10;

here smart compilers always replace the i in the second
statement with 10, when we use volatile keyword this will be
avoided and always there is a check of the i variable ,
before initialising it..
So the optimisation here is avoided

Is This Answer Correct ?    15 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List some basic data types in c?

539


What is far pointer in c?

785


Why is C language being considered a middle level language?

625


What is the most efficient way to count the number of bits which are set in an integer?

564


What is c language used for?

533






how to find binary of number?

3375


What is the difference between printf and scanf )?

565


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

633


What does %2f mean in c?

649


Explain what is wrong with this program statement?

593


What are all different types of pointers in c?

550


What is #define used for in c?

590


Write a program of advanced Fibonacci series.

680


What is floating point constants?

663


Write a program to maintain student’s record. Record should not be available to any unauthorized user. There are three (3) categories of users. Each user has its own type. It depends upon user’s type that which kind of operations user can perform. Their types and options are mentioned below: 1. Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record) 2. Super Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record, Delete Single Record) 3. Guest (Search Record [by Reg. No or Name], View All Records) When first time program runs, it asks to create accounts. Each user type has only 1 account (which means that there can be maximum 3 accounts). In account creation, following options are required: Login Name: <6-10 alphabets long, should be unique> Password: <6-10 alphabets long, should not display characters when user type> Confirm Password: Account Type: Login Name, Password and Account Type should be stored in a separate file in encrypted form. (Encryption means that actual information should be changed and Decryption means that Encrypted information is changed back to the actual information) If any of the above mentioned requirement(s) does not meet then point out mistake and ask user to specify information again. When Program is launched with already created accounts, it will ask for user name and password to authenticate. On successful authentication, give options according to the user’s type.

1485