If an integer occupies 4 bytes and a character occupies 1 byte of memory, each element of the  following structure would occupy how many bytes ?  struct name {  int age;  char name[30];  };  A) 30  B) 32  C) 34  D) 36

1 Answer

Answer :

C) 34

Related questions

Description : Which of the following has compilation error in C ? (A) int n = 32; (B) char ch = 65; (C) float f= (float) 3.2; (D) none of the above

Last Answer : D

Description : Because we wish to allow each ASCII code to occupy one location in memory, most memories are _____ addressable. a. BYTE b. NIBBLE c. WORD (16 bits) d. DOUBLEWORD (32 bits)

Last Answer : a. BYTE

Description : Arrange the following primitive data types in an ascending order of their size: (i) char (ii) byte (iii) double (iv) int

Last Answer : Ans. The sizes of the given data types are as follows char = 2 bytes byte = 1 byte double = 8 bytes int = 4 bytes Arranging them in ascending order gives byte < char < int < double

Description : State the number of bytes occupied by char and int data types.

Last Answer : Ans. char occupies two bytes and int occupied 4 bytes.

Description : Four channels are multiplexed using TDM. If each channel sends 100 bytes/second and we multiplex 1 byte per channel, then the bit rate for the link is ............... (A) 400 bps (B) 800 bps (C) 1600 bps (D) 3200 bps

Last Answer : (D) 3200 bps Answer: D Explanation: The multiplexer is shown in the Figure. Each frame carries 1 byte from each channel; the size of each frame, therefore, is 4 bytes, or 32 bits. Because each ... channel, the frame rate must be 100 frames per second. The bit rate is 100 32 = 3200 bps. 

Description : In a packet switching network, if the message size is 48 bytes and each packet contains a header of 3 bytes. If 24 packets are required to transmit the message, the packet size is ................ (1) 2 bytes (2) 1 byte (3) 4 bytes (4) 5 bytes

Last Answer : (4) 5 bytes 

Description : An integer takes a storage size of (a) 2 bytes (b) 1 byte -Technology

Last Answer : (a) An integer takes a storage size of 2 bytes.

Description : What will be the output of the following segment of the program? main( ) { char *s = “hello world”; int i = 7; printf(“%, *s”, i, s); } (A) Syntax error (B) hello w (C) hello (D) o world

Last Answer : Answer: Marks given to all

Description : A memory management system has 64 pages with 512 bytes page size. Physical memory consists of 32 page frames. Number of bits required in logical and physical address are respectively: (1) 14 and 15 (2) 14 and 29 (3) 15 and 14 (4) 16 and 32

Last Answer : (3) 15 and 14

Description : Station A uses 32 byte packets to transmit messages to station B using sliding window protocol. The round trip delay between A and B is 40 milli seconds and the bottleneck bandwidth on the path between A and B is 64 kbps. The optimal window size of A is (1) 20 (2) 10 (3) 30 (4) 40

Last Answer : (2) 10

Description : What does the following expression means ? char *(*(* a[N]) ( )) ( ); (A) a pointer to a function returning array of n pointers to function returning character pointers. (B) a ... to characters (D) an array of n pointers to function returning pointers to functions returning pointers to characters.

Last Answer : Answer: A,B,C,D

Description : A unix file system has 1-KB blocks and 4-byte disk addresses. What is the maximum file size if i-nodes contain 10 direct entries and one single, double and triple indirect entry each? (A) 32 GB (B) 64 GB (C) 16 GB (D) 1 GB

Last Answer : (C) 16 GB

Description : A method name myMethod( ) that needs two integer arguments is declared as A) public void myMethod( ); B) public void myMethod(int a, int b); C) public void myMethod(int a, b); D) public int myMethod(a, b);

Last Answer : B) public void myMethod(int a, int

Description : The correct way to round off a floating number x to an integer value is (A) y = (int)(x+0.5) (B) y = int(x+0.5) (C) y = (int)x+0.5 (D) y = (int)((int)x+0.5)

Last Answer : (A) y = (int)(x+0.5)

Description : A three dimensional array in C' is declared as int A[x][y][z]. Here, the address of an item at the location A[p][q][r] can be computed as follows (where w is the word length of an integer): (A) &A[0][0][0]+w(y*z*q+z*p+r) (B) &A ... *q+r) (C) &A[0][0][0]+w(x*y*p+z*q+r) (D) &A[0][0][0]+w(x*y*q+z*p+r)

Last Answer : Answer: B

Description : A byte addressable computer has a memory capacity of 2 m Kbytes and can perform 2 n operations. An instruction involving 3 operands and one operator needs a maximum of (A) 3m bits (B) m + n bits (C) 3m + n bits (D) 3m + n + 30 bits

Last Answer : (D) 3m + n + 30 bits

Description : Consider a 32 - bit microprocessor, with a 16 - bit external data bus, driven by an 8 MHz input clock. Assume that the microprocessor has a bus cycle whose minimum duration equals four input clock cycles. What ... (A) 8x106 bytes/sec (B) 4x106 bytes/sec (C) 16x106 bytes/sec (D) 4x109 bytes/sec 

Last Answer : (B) 4x106 bytes/sec

Description : Suppose that the time to do a null remote procedure call (RPC) (i.e, 0 data bytes) is 1.0 msec, with an additional 1.5 msec for every 1K of data. How long does it take to read 32 K from the file server as 32 1K RPCs? (A) 49 msec (B) 80 msec (C) 48 msec (D) 100 msec

Last Answer : (B) 80 msec

Description : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50'. What number is missing? -Riddles

Last Answer : 22

Description : Which of the following is not the java primitive type A) Byte B) Float C) Character D) Long double

Last Answer : D) Long double

Description : NULL is (A) the same as 0 for integer (B) the same as blank for character (C) the same as 0 for integer and blank for character (D) not a value

Last Answer : (D) not a value

Description : In how many different ways can the letters of the word 'RAPINE' be arranged in such a way that the vowels occupy only the odd positions? A) 32 B) 48 C) 36 D) 60 E) 120

Last Answer : Answer: C)  There are 6 letters in the given word, out of which there are 3 vowels and 3 consonants.  Let us mark these positions as under:  (1) (2) (3) (4) (5) (6)  Now, 3 vowels can be placed at ... .  Number of ways of these arrangements = 3P3 = 3! = 6.  Total number of ways = (6 x 6) = 36

Description : A gas occupies a volume of 0.2 L at 176 mm Hg. What volume will the gas occupy at 760 mm Hg?

Last Answer : 0.05 L

Description : A gas occupies a volume of 0.2 L at 176 mm Hg. What volume will the gas occupy at 760 mm Hg?

Last Answer : 0.05 L

Description : Four channels are multiplexed using TDM. If each channel sends 100 bytes/second and we multiplex 1 byte per channel, then the bit rate for the link is __________. a. 400 bps b. 800 bps c. 1600 bps d. 3200 bps

Last Answer : d. 3200 bps

Description : A UNIX file system has 1 KB block size and 4-byte disk addresses. What is the maximum file size if the inode contains ten direct block entries, one single indirect block entry, one double indirect block entry and one triple indirect block entry? (A) 30 GB (B) 64 GB (C) 16 GB (D) 1 GB

Last Answer : (C) 16 GB

Description : Eight years ago, the ratio of the ages of micky and Donald was 6:5, 12years hence, the ratio of their ages will be 11:10. What is Donald age at present a) 30 years b) 28 years c) 34 years d) 36 years

Last Answer : B Let 8 years ago the age of Micky and Donald be 6x and 5x resp. then, ((6x+8)+12) / ((5x+8)+12) = 11/10 10(6x+20) = 11(5x+20) 5x = 20 => x = 4 So Donald age is (5x+8) = 28

Description : My brother is 3 years elder to me. My father was 28 years of age when my sister was born while my mother was 26 years of age when I was born. If my sister was 4 years of age when my brother was born, ... father when my brother was born? a) 35 years b) 34 years c) 33 years d) 32 years e) 30 years

Last Answer : Let my age = x Then My brother's age = x + 3 My mother's age = x + 26 My sister's age = (x + 3) + 4 = x + 7 My Father's age = (x + 7) + 28 = x + 35 => age my father when my brother was born = x + 35 – (x + 3) = 32. Answer: d)

Description : Five years ago, the age of Arun was 4 times the age of Sarmi after 10 years, Arun will be twice as old as Sarmi. Find the Present ages of Arun and sarmi? a) 30 years, 10.5 years b) 32 years, 11.5 years c) 34 years, 14.5 years d) 35 years, 12.5 years e) None of these

Last Answer : Five years ago, x – 5/y – 5 = 4/1 x – 4y = – 15 —-(i) After 10 years, x + 10/y + 10 = 2/1 x – 2y = 10 —–(ii) From eqn (i) and (ii) => x = 35, y = 12.5 Answer: d)

Description : What is the output of the following program ? (Assume that the appropriate pre-processor directives are included and there is no syntax error) main() { char S[ ] = "ABCDEFGH"; printf ("%C",* (& ... Base address of S is 1000 */ } (A) ABCDEFGH1000 (B) CDEFGH1000 (C) DDEFGHH1000 (D) DEFGH1000

Last Answer : (D) DEFGH1000

Description : A dynamic RAM has refresh cycle of 32 times per msec. Each refresh operation requires 100 nsec and a memory cycle requires 250 nsec. What percentage of memory’s total operating time is required for refreshes? (A) 0.64 (B) 0.96 (C) 2.00 (D) 0.32

Last Answer : Answer: D Explanation: in 1ms : refresh = 32 times Memory cycle = 1ms/250ns = 106ns/250ns = 4000 times Therefore, % of refresh time = (32 x 100ns)/(4000 x 250ns) = 3200ns/1000000 x 100% = 0.32%

Description : Assume that variable x resides at memory location 1234, y at 1111 and p at 2222. Int x=1, y=2, *p; p=&x; y=*p; What will be the value of y after execution of above code? A) 2 B) 1 C) 1234 D) 1111

Last Answer : C) 1234

Description : What are the types of casting shown by the following examples: (i) char c = (char)120; (ii) int x = ‘t’;

Last Answer : Ans. (i) Explicit casting (ii) Implicit casting

Description : Classify the following as primitive or non-primitive data types: (i) char (ii) arrays (iii) int (iv) classes

Last Answer : Ans. (i) char – Primitive (ii) arrays – Non primitive (iii) int – Primitive (iv) Classes – Non primitive

Description : Classify the following as primitive or non-primitive data types: (i) char (ii) arrays (iii) int (iv) classes

Last Answer : Ans. (i) char – Primitive (ii) arrays – Non primitive (iii) int – Primitive (iv) Classes – Non primitive

Description : Give output for following code: class student { int roll no; char name [14]; } s[6]; void main() { cout<<sizeof(s); }

Last Answer : Considering roll_no(Single variable) the output is: 96 OR Considering roll, no (Two variables) the output is: 108 OR Considering roll no the output is: error – space between roll and no

Description : Find the root value of 36.1 / 102.4 (1) 61 / 34 (2) 19 / 31 (3) 19 / 32 (4) 19 / 33

Last Answer : (3) 19 / 32

Description : If there are n integers to sort, each integer has d digits and each digit is in the set {1,2, ..., k}, radix sort can sort the numbers in: (A) O(d n k) (B) O(d nk) (C) O((d+n)k) (D) O(d(n+k))

Last Answer : (D) O(d(n+k))

Description : For the implementation of a paging scheme, suppose the average process size be x bytes, the page size be y bytes, and each page entry requires z bytes. The optimum page size that minimizes the total overhead due to the page ... fragmentation loss is given by (A) x/2 (B) xz/2 (C) √2xz (D) (√xz)/2

Last Answer : (C) √2xz 

Description : Which of the following information about the UNIX file system is not correct? (A) Super block contains the number of i-nodes, the number of disk blocks, and the start of the list of free disk blocks. (B ... Each i-node is 256-bytes long. (D) All the files and directories are stored in data blocks. 

Last Answer : (C) Each i-node is 256-bytes long.

Description : (2) Exclusion Principle of Pauli Explanation: The Pauli exclusion principle is the quantum mechanical principle that no two identical fermions (particles with half-integer spin) may occupy the same ... function for two identical fermions is anti-symmetric with respect to exchange of the particles.

Last Answer : The three elements most needed in common fertilizers are – (1) Sulphur, Phosphorous and Sodium (2) Nitrogen, Phosphorous and Sodium (3) Phosphorous, Sodium and Nitrogen (4) Calcium, Phosphorous and Potassium

Description : A memory unit stores 2^16 bytes in 32-bit words. How many address bits are necessary in order to retrieve a single word from this memory unit?

Last Answer : Each word is 4 bytes, which occupies 4 consecutive addresses at 16 bits each. The first 14 bits of these addresses will be the same, differing only in the two least significant bits. You only need to specify the first 14 bits, because there are only 2^14 words occupying those 2^16 bytes.

Description : Ten signals, each requiring 3000 Hz, are multiplexed on to a single channel using FDM. How much minimum bandwidth is required for the multiplexed channel ? Assume that the guard bands are 300 Hz wide. (A) 30,000 (B) 32,700 (C) 33,000 (D) None of the above

Last Answer : (B) 32,700

Description : In Frame Relay, the EA field defines thenumber of bytes; it is _____ in the last byte of the address. A) 0 B) 1 C) 2 D) 3

Last Answer : 1

Description : In IPv4, if the fragment offset hasa value of 100, it means that _______. A) thedatagram has notbeen fragmented B) thedatagram is 100 bytes in size C) thefirst byte of the datagram is byte100 D) the first byteof the datagram is byte800

Last Answer : the first byteof the datagram is byte800

Description : Given the symbols A, B, C, D, E, F, G and H with the probabilities 1/30, 1/30, 1/30, 2/30, 3/30, 5/30, 5/30 and 12/30 respectively. The average Huffman code size in bits per symbol is: (A) 67/30 (B) 70/34 (C) 76/30 (D) 78/30

Last Answer : (C) 76/30

Description : 12 years ago M was half of N in age. If the ratio of their present ages is 4 : 5, what will be the total of their present ages a) 30 b) 35 c) 36 d) 32

Last Answer : C Let M's age 12 years ago = x years. Then, N's age 12 years ago = 2x years. (x + 12) / (2x+ l2) = 4/5 => x = 4. So, the total of their present ages =(x + 12 + 2x + 12) = (3x + 24) = 36 years.

Description : A thread is usually defined as a light weight process because an Operating System (OS) maintains smaller data structure for a thread than for a process. In relation to this, which of the following ... separate stack for each thread. (D) OS does not maintain virtual memory state for each thread.

Last Answer : (B) OS maintains only CPU registers for each thread.

Description : A DMA controller transfers 32-bit words to memory using cycle Stealing. The words are assembled from a device that transmits characters at a rate of 4800 characters per second. The CPU is fetching and executing instructions at an average ... of the DMA transfer? (A) 0.06% (B) 0.12% (C) 1.2% (D) 2.5%

Last Answer : Answer: B

Description : What will be the output? numberGames = {} numberGames[(1,2,4)] = 8 numberGames[(4,2,1)] = 10 numberGames[(1,2)] = 12 sum = 0 for k in numberGames: sum += numberGames[k] print len(numberGames) + sum Page No 36 a) 30 b) 24 c) 33 d) 12

Last Answer : a) 30