wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Static char
wer[3][4] =
{"bag","lets","bud"};
char(ptrp[4]
=wer)
the possible output of printF("%d %d", ptr,ptr+1); is

A
262, 262
No worries! Weā€˜ve got your back. Try BYJUā€˜S free classes today!
B
262, 266
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
262, 263
No worries! Weā€˜ve got your back. Try BYJUā€˜S free classes today!
D
262, 265
No worries! Weā€˜ve got your back. Try BYJUā€˜S free classes today!
Open in App
Solution

The correct option is B 262, 266

Static char
wer[3][4] =
{"bag","lets","bud"};
char(ptrp[4]
=wer)
The possible output of printf("%d %d", ptr,ptr+1); is 262,266.

Staticis used with global variables and functions to set their scope to the containing file. In local variables, static is used to store the variable in the statically allocated memory instead of the automatically allocated memory.



flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Introduction to Services
BUSINESS STUDIES
Watch in App
Join BYJU'S Learning Program
CrossIcon