answersLogoWhite

0

enum field { name, course, grade }; std::string student[3];

student[name] = "Joe Bloggs";

student[course] = "C++ Programming";

student[grade] = "A+";

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

How can you do the same thing as the program below but using strings and arrays in C language?

Program below?!


What are input and out put string?

Input strings are character arrays that are initialised from input devices, such as file streams with read access and the keyboard. Output strings are character arrays sent to output devices such as files with write access, the console (display) and printers.


How do you print my name in c program in vertical manner using arrays?

you need strings to print any character(your name) this is not possible useing array:D


What are Strings in C programming?

Arrays of chars are strings. there is a built in librray, that handles string string.h but the data-type is held as arrays of chars. char[10] c="string"; translate to ['s','t','r','i','n','g',\0] Arrays of chars are strings. there is a built in librray, that handles string string.h but the data-type is held as arrays of chars. char[10] c="string"; translate to ['s','t','r','i','n','g',\0]


What is type string in C?

Nothing, zero-terminated char-arrays are used instead of strings.


Write a program to read your name and reverse it using arrays?

abdulrahman


How do you create a program in visual basic?

arrays programms in visual basic


What are the applications of array?

arrays are used to store the group of data which are of same type. These arrays can be applied in student mark sheet applications,online library applications etc.


Write a program to find intersection between two arrays?

#include<stdio.h>


Why do you use ampersand symbol for arrays and not for a string?

You don't need to use ampersand for arrays; it's entirely optional even for strings (character arrays). This is because arrays will implicitly convert to a pointer at the slightest provocation. Thus for an array named X, you can either pass the array to a function as X, &X or &X[0], they all refer to the exact same address.


How are string stored in c language?

Strings represented by the language character set (e.g., ASCII) are stored as null-terminated arrays of type char. Wide-character strings are stored as null-terminated arrays of type wchar_t. Other types are also available, such as char16 and char32 (for UTF16 and UTF32 encodings, respectively).


Dynamically allocated array waste storage and time?

It's actually not true. In order to make a good program which can work with big arrays you have to use dynamic arrays because you can cleam memory used by dymanic arrays any time. For static arrays is not true, memery which was reserved for static arrays will be available for other applications only when you finish working with your application (which is working with static arrays).