Computer Science, asked by ishraq78600, 4 months ago

what will be the size in bytes of the array xyz [12] of int type and pqr[15] of char type​

Answers

Answered by BiswaShresikha
1

Answer:

Below is the C program to find the size of the char variable and char array:

filter_none

edit

play_arrow

brightness_4

// C program to find the size of

// char data type and char array

 

#include <stdio.h>

 

int main()

{

 

   char charType = 'G';

   char arr[] = { 'G', 'F', 'G' };

 

   // Calculate and Print

   // the size of charType

   printf("Size of char datatype is: %ld byte\n",

          sizeof(charType));

 

   // Calculate the size of char array

   size_t size = sizeof(arr) / sizeof(arr[0]);

 

   // Print the size of char array

   printf("Size of char array is: %ld byte",

          size);

 

   return 0;

}

Similar questions