answersLogoWhite

0


Best Answer

int[] marks = new int[3];

int marks[3];

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Declare an integer array marks that can be used to store 3 elements?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you declare an int array?

we define the array isArray array[]={1,2,3,4,5} this is the integer ArrayArray array[]={"apple","banana","carrot","mango"} this is the String Array


What is mean by Extra key inserted at the end of Array?

It means the array has a sentinel to mark the end of the array. Any elements that follow the sentinel element are deemed invalid. Sentinels are usually denoted with a special value that is not used by any of the elements that precede it. Null-terminated strings are an example, where the NULL character (ASCII code 0) marks the end of a character array.


What are the benefits of multidimensional arrays?

Multi-dimensional arrays are accessed using more than one index: one for each dimension. Multidimensional indexing can be reduced internally to linear indexing; for example, a two-dimensional array with 6 rows and 5 columns is typically represented by a one-dimensional array of 30 elements.


How atoi works in c?

atoi ASCII to Integer Is what it does and that should be enough for you to formulate a full marks answer for your homework.


How do you declare a two dimensional array with initialiser in C programming?

#include <iostream> #include <iomanip> using std::cout; using std::endl; using std::setw; int main() { static const char *Rush[3][2] = { { "Geddy Lee", "Vocals, bass and keyboards" }, { "Alex Lifeson", "Lead/rhythm guitar" }, { "Neil Peart", "Drums & percussion" }}; cout << "Personnel:" << endl << endl; for (int nPerson=0; nPerson<3; ++nPerson) cout << setw(16) << Rush[nPerson][0] << " : " << Rush[nPerson][1] << endl; cout << endl; return( 0 ); }

Related questions

How do you declare an int array?

we define the array isArray array[]={1,2,3,4,5} this is the integer ArrayArray array[]={"apple","banana","carrot","mango"} this is the String Array


What is mean by Extra key inserted at the end of Array?

It means the array has a sentinel to mark the end of the array. Any elements that follow the sentinel element are deemed invalid. Sentinels are usually denoted with a special value that is not used by any of the elements that precede it. Null-terminated strings are an example, where the NULL character (ASCII code 0) marks the end of a character array.


What are the benefits of multidimensional arrays?

Multi-dimensional arrays are accessed using more than one index: one for each dimension. Multidimensional indexing can be reduced internally to linear indexing; for example, a two-dimensional array with 6 rows and 5 columns is typically represented by a one-dimensional array of 30 elements.


How atoi works in c?

atoi ASCII to Integer Is what it does and that should be enough for you to formulate a full marks answer for your homework.


How do you declare a two dimensional array with initialiser in C programming?

#include <iostream> #include <iomanip> using std::cout; using std::endl; using std::setw; int main() { static const char *Rush[3][2] = { { "Geddy Lee", "Vocals, bass and keyboards" }, { "Alex Lifeson", "Lead/rhythm guitar" }, { "Neil Peart", "Drums & percussion" }}; cout << "Personnel:" << endl << endl; for (int nPerson=0; nPerson<3; ++nPerson) cout << setw(16) << Rush[nPerson][0] << " : " << Rush[nPerson][1] << endl; cout << endl; return( 0 ); }


What are the benefits of marks and Spencer credit card for the customer?

Marks & Spencer have a loyalty scheme that rewards the user of issued card with perks that include travel, exclusive online sales and vouchers for an array of products and services.


Is 30 marks enough for physics to pass in 2nd puc?

For Second PUC Supplementary exams, 30 is the passing marks. But if it is your first attempt and you score 30, the board compares your other subjects' marks and if it is pretty manageable, they say its Exempted, and declare it to be Pass.


What is array of string?

An array of strings is usually implemented as an array of character pointers. Each pointer refers to a a null-terminated character array, and can be treated just as if it were a two-dimensional array where the length of each "row" is not fixed length (the null terminator marks the end of each row). The array of character pointers must be allocated in contiguous memory (as must all one-dimensional arrays), however the character arrays they point to need not be allocated contiguously with each other (only the individual one-dimensional character arrays must be contiguous).


What elements of glass means that it is not perfect for making windows?

Glass can break easily, and can get marks and scratches


What are the passing marks in Pakistan for maths in board out of 75?

Different Boards have different criteria. Federal board students have to score 50% marks, the same applies to O and A Level students. Whereas, most of other boards declare students pass if they score over 33% marks.


What is the significance of the zigzag line?

Well, on British roads it means you can't park there.metalloidsOn the periodic table of elements, the zigzag dark line marks the elements that are metalloids.


What is the purpose of an array?

An array is a sequence of logically related data items. It is a kind of row mad of boxes with each box holding a value . Each box can be accessed by , first box , second box, third box, so on. till the nth box. ( submit by keshaw kumar Bokaro Niit)