menu search
person
thumb_up_alt 1 like thumb_down_alt 0 dislike
96 views

1 Answer

The volatile keyword is a part of C standard, and this warns the compiler that ISR might change the value of a variable so that the compiler will not optimize the code in a way that will make it fall.

Here, need to declare:

static volatile long int iSecondsToday;

With the volatile keyword in the declaration, the compiler will know that the variable is volatile and each reference is read from memory.

If the keyword is not supported, you can still get the similar result by turning off the compiler optimizations.
thumb_up_alt 0 like thumb_down_alt 0 dislike
← Prev Question Next Question →

Related questions

Description :

Which of the following is used to make an Abstract class ? (A) Making atleast one member function as pure virtual function (B) Making atleast one member function as virtual function (C) Declaring as Abstract class using virtual keyword (D) Declaring as Abstract class using static keyword

Answer :

(A) Making atleast one member function as pure virtual function

thumb_up_alt 0 like thumb_down_alt 0 dislike
13 views 1 answer
Description :

Consider the following statements regarding relational database model: (a) NULL values can be used to opt a tuple out of enforcement of a foreign key. (b) Suppose that table T has only one candidate key. If Q is in 3NF, then it is also in BCNF. (c) The difference between the project operator (P) in relational algebra and the SELECT keyword in SQL is that if the resulting ... ) and (b) are true. (B) (a) and (c) are true. (C) (b) and (c) are true. (D) (a), (b) and (c) are true.

Answer :

(D) (a), (b) and (c) are true.

thumb_up_alt 0 like thumb_down_alt 0 dislike
15 views 1 answer
Description :

A keyword can be used as an identifier by using theĀ  A) prefix # B) prefix @ C) prefix $ D) prefix x

Answer :

A keyword can be used as an identifier by using the prefix @

thumb_up_alt 0 like thumb_down_alt 0 dislike
40 views 1 answer
Description :

Random Access Memory (RAM), a form of computer storage, is a ............. memory. (A) Non-volatile (B) Volatile (C) Permanent (D) Secondary

Answer :

Answer: B

thumb_up_alt 0 like thumb_down_alt 0 dislike
18 views 1 answer
Description :

................. is subject oriented, integrated, time variant, non-volatile collection of data in support of management decisions. (A) Data mining (B) Web mining (C) Data warehouse (D) Database Management System

Answer :

(C) Data warehouse

thumb_up_alt 0 like thumb_down_alt 0 dislike
16 views 1 answer
Description :

Which of the following computer memories is non-volatile ? (1) DRAM (2) SRAM (3) ROM (4) RAM

Answer :

ROM

thumb_up_alt 0 like thumb_down_alt 0 dislike
6 views 1 answer
Description :

RAM is used as a short memory in a computer because it: (1) Is volatile (2) Is programmable (3) Has less capacity (4) Is very expensive

Answer :

Is volatile

thumb_up_alt 0 like thumb_down_alt 0 dislike
5 views 1 answer
Description :

Spirit in contact with body gives cool sensation because it is : (1) liquid (2) transparent (3) highly volatile (4) a good conductor

Answer :

highly volatile

thumb_up_alt 0 like thumb_down_alt 0 dislike
8 views 1 answer
Description :

Which of the following type of coal has the lowest proportion of volatile matter ? (1) Lignite (2) Peat (3) Bituminous (4) Anthracite

Answer :

Anthracite

thumb_up_alt 0 like thumb_down_alt 0 dislike
3 views 1 answer
Description :

Alcohol is more volatile than water because _________ is lower than water. (1) its boiling point (2) its density (3) its viscosity (4) its surface tension

Answer :

its boiling point

thumb_up_alt 0 like thumb_down_alt 0 dislike
9 views 1 answer
...