enum field { name, course, grade }; std::string student[3];
student[name] = "Joe Bloggs";
student[course] = "C++ Programming";
student[grade] = "A+";
you need strings to print any character(your name) this is not possible useing array:D
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.
#include<stdio.h>
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.
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).
Program below?!
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.
you need strings to print any character(your name) this is not possible useing array:D
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]
Nothing, zero-terminated char-arrays are used instead of strings.
abdulrahman
arrays programms in visual basic
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.
#include<stdio.h>
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.
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).
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).