answersLogoWhite

0


Best Answer

Depends on the context of the question you were asking from, there are 2 distinct answers: Yes and NO.

In the narrowest definition, any array is NOT a primitive data type in C#. Hence a string array is NOT a primitive data type in that context.

A string itself, however, is a primitive data type. Some developers would like to extend the definition of "primitives" into the arrays, collections, and Enumeration. Thus, in this context, an array of string IS a primitive data type.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

yes,String arr is a non primitive data type.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is string arr a non primitive data type?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

How do you count no of vowels and print also in java?

suppose we have a string String s = "hello how are you..."; char arr[] = s.toCharArray(); for(i = 0; i < arr.length; i++) { if(arr[i] 'u') System.out.println(arr[i]); } that is it .I hope it works.If there is a better process let me know at :- "hello2.abhishek.pal@gmail.com"...


How do you find out max string in a given sentence?

Random r = new Random9() for(int i = 0; i<arr lenght: i++{assuming the array variables is named arr... arr[i] = r nextlnt(2oo); }


Why address operator is not used in the case of string input If No What is the reason?

I guess by 'string' you mean a character-array; so the answer is: an array in itself is a pointer to its first element: arr==&arr[0]. (Note: it is a pointer-constantant, not a pointer-variable, so you cannot change it's value: 'arr= something' is wrong.)


Write a c function for minimum and maximum value from the given input?

Assume that all your data were saved in array of type double and size 100:int arrSize = 100;double arr[arrSize] = {0.0};...for(int i = 0;...){...cin >> arr[i];//here you enter all elements using loop for}...Out side of the function main you can define two functions max and min which take the array arr as argumentdouble min(const arr[], int arrSize){double minimum = arr[0];for (int j = 0; j < arrSize; j++){if (minimum > arr[j]){minimum = arr[j];}}return minimum;}double max(const arr[], int arrSize){double maximum = arr[0];for (int j = 0; j < arrSize; j++){if (maximum < arr[j]){maximum = arr[j];}}return maximum;}


What is overloded?

In Java, overloading a method is when you use the same signature for several methods in a class but alter the argument list in each method. Note that although the return types can be altered, overloading is only recognized when the arguments are changed. An example is shown below:public int add(int[] arr){...}public double add(double[] arr,double t){...}public String add(String[] arr){...}


How do you access data from 3D array using pointers?

eg: int arr[3][4][5]; int *p= &amp;arr[2][1][0]; *p= 10;


How to write a program to store ten elements to an array and display the smallest element using C programming?

You data has to be stored in the array arr[] of size 10.double min(const arr[], int arrSize){double minimum = arr[0];for (int j = 0; j < arrSize; j++){if (minimum > arr[j]){minimum = arr[j];}}return minimum;}


How do you sort array in php without use of sort function?

$arr=array(2,5,4,6,7,8,1); for($i=0;$i&lt;count($arr);$i++) { for($j=$i;$j&lt;count($arr);$j++) { if($arr[$i] &gt; $arr[$j]) { $temp=$arr[$i]; $arr[$i]=$arr[$j]; $arr[$j]=$temp; } } }


Are the expressions 'arr' and ' and arr' are same for an array of integers?

No arr refers to address of array &amp;arr refers address of address of array but compiler treats arr and &amp; arr, so even you place arr and &amp; arr no error only warnings will be displayed.


Are the expressions ARR and and ARR same for char20?

Yes, 'ARR' and 'ARR' are the same for char20. Whatever it means.


What do you mean by array overflow?

for example:int arr[3];arr[0] = 1; /* ok */arr[1] = 2; /* ok */arr[2] = 0; /* ok */arr[3] = -1; /* wrong */arr[-1] = -3; /* wrong */


What would you use to terminate the string that is a character array?

If you use a declaration like:char arr[] = "blablabla";It already has a terminating symbol such as '\0'. As result your array has + 1 element. You can use '\0' to check that you have reached the end of a string.