answersLogoWhite

0

Write a program to show array within class in c?

Updated: 8/16/2019
User Avatar

Wiki User

17y ago

Best Answer

class is defined in c++ my dear so in C there is no structure of class.for c++ class private { int x[10],y; cout

User Avatar

Wiki User

17y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to show array within class in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


How can write a c program to store students record in a file?

Write a console based C++ program that reads student information from a text file, build an array of objects of type class StudentInfo,


Write a program to sort elements of an array in ascending order?

import java.util.Arrays; public class arraysort { public static void main(String[] a) { int array[] = { 2, 5, -2, 6, -3 }; Arrays.sort(array); for (int i : array) { System.out.println(i); } } }


Inner class oops?

Inner class oops is a program. This program is smaller class within a bigger class.


Write a program to find the grade obtained by the students of a class using structure?

Write a program to find the grade obtained by the students of a class


Why is an array called a derived data type?

An array is not a derived data type at all. In order to be derived there has to be a base class and an array has no base class. Here is the basic declaration of the std::array template class from the <array> header file: template<class _Ty, size_t _Size> class array { // fixed size array of values // ... }; A vector, on the other hand, is derived (from the <vector> header file): template<class _Ty, class _Alloc = allocator<_Ty>> class vector : public _Vector_alloc<!is_empty<_Alloc>::value, _Vec_base_types<_Ty, _Alloc>> { // varying size array of values // ... };


How do you write a binomial distribution table in C program?

Class&genus


How use array sort program in c sharp?

Assume an array of integers (size > 0) to be sorted in descending order. And the values have been populated already: const int size = 50; //by changing the value here int[] array = new int[](); // omit the initialization of array Array.Sort(array); // array will be changed with ascending order Array.Reverse(array); // change from ascending to descending NOTE: Array.Sort() and Array.Reverse() are 2 of the functions in the class library. We do not care the algorithm being used within the functions, just the result. Also noted that the these 2 functions do change the content of the source array. It may not be what you want


Write a c plus plus program to create a class car and aggregate it with wheel and engine parts?

You'll need to fill in the details, but the following framework will get you started. class Car { private: class Engine {}; // implementation omitted for brevity class Wheel {}; // implementation omitted for brevity Wheel m_front_wheel[2]; // array of two front wheels Wheel m_rear_wheel[2]; // array of two rear wheels Engine m_engine; // an engine }; int main() { Car ferrari; Car bmw; Car smart_car; return( 0 ); }


What is an array of class objects.how the array of class of class objects is defined in c plus plus?

An array of class objects is just a set of class objects arranged linearly in memory. It is no different than an array of elementary objects. You define it the same way. class myClass { ... }; myClass arrayOfMyClass[100]; // creates 100 objects and fires the constructor 100 times


How can you store Class properties in Array in c?

Yes, you can create array that will store class properties. But all of them have to be of the same type.


Write a program to display the name of days when a user enters a number?

write a program to display your name age class schoolname e-mail 2hobby based on choice