Determine the total byte required to store a char array Arr[20]
Home
/
Computer Science
/
Determine the total byte required to store a char array Arr[20]
Determine the total byte required to store a char array Arr[20]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
Given a char variable and a char array, the task is to write a program to find the size of this char variable and char array in C.
Explanation:
Input: ch = 'G', arr[] = {'G', 'F', 'G'}
Output:
Size of char datatype is: 1 byte
Size of char array is: 3 byte
Input:
ch = 'G', arr[] = {'G', 'F'}
Output:
Size of char datatype is: 1 byte
Size of char array is: 2 byte