Q.No:1:- What is the index number of the last element of an array with 29 elements?
a) 28 b) 29 c) 0 d) NOT
Answer: A because index value always starts from 0
Q.No:2:-How many bytes are reserved by integer Value in memory?
a) 4 bytes b) 2 bytes c) 8 bytes d) NOT
Answer: A because the integer value contains 4 bytes in memory and 32 bits
Q.No:3:- Which of the following accesses the seventh element stored in the array?
a) Array [7] b) Array [6] c) Array [5] d) Array [9]
Answer: B because the Seventh element can access from index value 6 and it always starts from 0
Q.No:4:-Step by step solution of any problem is also called?
a) Algorithm b) Pseudocode c) Both A&B d) NOT
Answer: A
Q.No:5:- Which one is primitive data type?
a) Array b) Stack c) Queue d) NOT
Answer: D Because primitive data types are pre-defined data types in c++ like int, float char, etc...
Q.No:6:-Array lower bond is always started from?
a) 0 b) 1 c) Both A & B d) NOT.
Answer: B
Q.No:7:-when we declare int variable like int a=10;, How much space is reserved by this variable?
a) 4 bytes b) 32 bits c) Both A&B d) NOT
Answer: B Because the 10 is int value and int value contains 4 bytes and we know that 1 byte =8 bit so 4 bytes = 32 bits
Q.No:8:- variable is used to store address/reference of another variable?
a) Simple Variable b) Pointer Variable c) Both A&B d) NOT
Answer: B Because Pointer variable used to store another variable address
Q.No:9:-Address of any variable must be in which Form?
a) Natural b) Hexadecimal c) Whole Number d) NOT
Answer: B Because When we store any single variable so it addresses in Hexadecimal form use this program and get the address of x variable
#include <iostream>
using namespace std;
int main() {
int x = 27;
cout << "Value of x is : "<<&x<<endl;
return 0;
}
Q.No:10:- A linear collection of data elements where the linear node is given by means of pointer is called?
a) Linked List b) Node List c) Primitive List d) AOT
Answer: A


0 Comments