Computer Applications
State the total size in bytes, of the arrays a[4] of char data type and p[4] of float data type.
Java Arrays
ICSE 2011
36 Likes
Answer
Size of char a[4] is 4 × 2 = 8 Bytes.
Size of float p[4] is 4 × 4 = 16 Bytes.
Answered By
19 Likes
Related Questions
Write a Java program to store n numbers in an one dimensional array. Pass this array to a function number(int a[]). Display only those numbers whose sum of digit is prime.
Define a class to search for a value input by the user from the list of values given below. If it is found display the message "Search successful", otherwise display the message "Search element not found" using Binary search technique.
5.6, 11.5, 20.8, 35.4, 43.1, 52.4, 66.6, 78.9, 80.0, 95.5.
Consider the following program segment and answer the questions given below:
int x[][] = {{2,4,5,6}, {5,7,8,1}, {34, 1, 10, 9}};(a) What is the position of 34?
(b) What is the result of x[2][3] + x[1][2]?