Web Technologies
Android
Angular
BootStrap
ECMAScript
HTML
Image Processing
JavaScript
MVC
Onsen UI
React JS
SOAP UI
Vue.js
Cloud/DevOps Technologies
Amazon EC2
Ansible
Augmented Reality
AWS
Azure
Big Data
Cache Teachniques
Cassandra
Commercial Insurance
Cloud
CD
CI
Data Handling
Data using R
Data Science
DevOps
Gradle
Hadoop
HBase
HDFS
Hive
IOT
Jenkins
Machine Learning
MangoDB
NGINX
SOAP UI
Latest Technologies
5G Network
Agile
Android
Arduino
Augmented Reality
Commercial Insurance
C#
C++
Cyber Security
Data Handling
Data using R
Data Science
DBMS
Design-Pattern
Fortify
Ethical Hacking
Framework
GIT
GIT Slack
Image Processing
Java
Jenkins
Jira
JUnit
Kibana
Linux
MangoDB
Oracle
PHP
Python
QTP
R Language
Regression Analysis
Robotic
Salesforce
SAP
Selenium
Service Discovery
Service Now
Spark SQL
Testing
TOGAF
Research Method
Virtual Reality
Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Why is it necessary to give the size of an array in an array declaration in C Language?
Home
C Plus Plus
Why is it necessary to give the size of an array in an array declaration in C Language?
0
votes
asked
Mar 17, 2020
in
C Plus Plus
by
rajeshsharma
(
23.1k
points)
Why is it necessary to give the size of an array in an array declaration in C Language?
#c-language-array-of-array
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Mar 17, 2020
by
Robindeniel
(
19.8k
points)
When an array is declared, the compiler allocates a base address and reserves enough space
in
memory for all the elements of the array. The size is required to allocate the required space and
hence size must be mentioned.
Related questions
0
votes
Is it possible to have negative index in an array in C Language?
asked
Mar 17, 2020
in
C Plus Plus
by
rajeshsharma
(
23.1k
points)
#c-language-negative-index
+2
votes
Select the best from following can be considered as the correct syntax for declaring an array of pointers of integers that has a size of 10 in C++?
asked
Jan 21, 2021
in
C Plus Plus
by
SakshiSharma
(
30.8k
points)
#array
array-size
0
votes
Can the size of an array be increased after declaration?
asked
Oct 13, 2020
in
JAVA
by
SakshiSharma
(
30.8k
points)
#size-of-an-array-
array-size
Java-questions-answers
+2
votes
Which type of memory is used by an Array in C++ programming language?
asked
Jan 21, 2021
in
C Plus Plus
by
SakshiSharma
(
30.8k
points)
#c
-array
#array
0
votes
What is an array of pointers in C Language?
asked
Mar 17, 2020
in
C Plus Plus
by
rajeshsharma
(
23.1k
points)
#c-language-array-pointer
0
votes
Are the expressions arr and &arr same for an array of integers in C Language?
asked
Mar 12, 2020
in
C Plus Plus
by
rahuljain1
(
6.0k
points)
#c-language-expressions
0
votes
In C, why is the void pointer useful in C Language? When would you use it in C Language?
asked
Mar 12, 2020
in
C Plus Plus
by
rahuljain1
(
6.0k
points)
#c-language-void-pointer
+2
votes
How many types of the array are there in the C++ programming language?
asked
Jan 21, 2021
in
C Plus Plus
by
SakshiSharma
(
30.8k
points)
#c-array
array
0
votes
What is a NULL Pointer in C Language? Whether it is same as an uninitialized pointer in C Language?
asked
Mar 12, 2020
in
C Plus Plus
by
rahuljain1
(
6.0k
points)
#c-language-null-pointer
0
votes
What is the use of ‘using' declaration in C++
asked
Jun 11, 2020
in
C Plus Plus
by
Robindeniel
(
19.8k
points)
#c
-declaration
#declaration-c
...