CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

A variable can be declared static using the keyword

A
extern
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
static
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
register
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
auto
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B static

A variable can be declared static using the keyword static.

To create a static member precedes its declaration with the keyword static. When a member is declared static, it can be accessed before any objects of its class are created, and without reference to any object.

The static keyword denotes that a member variable, or method, can be accessed without requiring an instantiation of the class to which it belongs.


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
The Equation of State
PHYSICS
Watch in App
Join BYJU'S Learning Program
CrossIcon