Class 7 Exam  >  Class 7 Questions  >  Which of the following statement(s) is/are co... Start Learning for Free
Which of the following statement(s) is/are correct?
  • a)
    * operator is used to declare a reference
  • b)
    A reference variable defined to refer a particular variable can refer to any other variable also
  • c)
    References must always be initialized inside classes
  • d)
    A variable can have more than one references
Correct answer is option 'D'. Can you explain this answer?
Most Upvoted Answer
Which of the following statement(s) is/are correct?a)* operator is use...
Explanation:

a) * operator is used to declare a reference:
This statement is incorrect. The * operator is used to declare a pointer, not a reference. References are declared using the & operator. For example:
```
int num = 10;
int &ref = num; // declaring a reference
```

b) A reference variable defined to refer a particular variable can refer to any other variable also:
This statement is correct. Once a reference variable is defined to refer to a particular variable, it can later refer to any other variable of the same type. For example:
```
int num1 = 10;
int num2 = 20;

int &ref = num1; // ref refers to num1
ref = num2; // ref now refers to num2, num1 is unchanged
```
In the above example, initially the reference variable `ref` is referring to `num1`. But later, it is assigned to `num2`, so now `ref` refers to `num2` instead.

c) References must always be initialized inside classes:
This statement is incorrect. References can be declared and initialized inside classes, but they are not limited to being initialized only inside classes. References can be declared and initialized in any scope where variables are allowed. For example:
```
void function() {
int num = 10;
int &ref = num; // reference initialized inside a function
}
```
In the above example, the reference variable `ref` is declared and initialized inside the `function()`.

d) A variable can have more than one references:
This statement is correct. A variable can have multiple references pointing to it. This means that multiple reference variables can be declared and initialized to refer to the same variable. Any changes made through one reference will be reflected in the original variable and can be accessed through other references as well. For example:
```
int num = 10;
int &ref1 = num; // first reference
int &ref2 = num; // second reference

ref1 = 20; // num and ref2 will also be 20
```
In the above example, both `ref1` and `ref2` are references to `num`. So any changes made through `ref1` will also be reflected in `num` and `ref2`.
Free Test
Community Answer
Which of the following statement(s) is/are correct?a)* operator is use...
A variable can have multiple references as references are nothing just another name for a variable hence a variable can more than one references.
Attention Class 7 Students!
To make sure you are not studying endlessly, EduRev has designed Class 7 study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Class 7.
Explore Courses for Class 7 exam

Top Courses for Class 7

Which of the following statement(s) is/are correct?a)* operator is used to declare a referenceb)A reference variable defined to refer a particular variable can refer to any other variable alsoc)References must always be initialized inside classesd)A variable can have more than one referencesCorrect answer is option 'D'. Can you explain this answer?
Question Description
Which of the following statement(s) is/are correct?a)* operator is used to declare a referenceb)A reference variable defined to refer a particular variable can refer to any other variable alsoc)References must always be initialized inside classesd)A variable can have more than one referencesCorrect answer is option 'D'. Can you explain this answer? for Class 7 2024 is part of Class 7 preparation. The Question and answers have been prepared according to the Class 7 exam syllabus. Information about Which of the following statement(s) is/are correct?a)* operator is used to declare a referenceb)A reference variable defined to refer a particular variable can refer to any other variable alsoc)References must always be initialized inside classesd)A variable can have more than one referencesCorrect answer is option 'D'. Can you explain this answer? covers all topics & solutions for Class 7 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which of the following statement(s) is/are correct?a)* operator is used to declare a referenceb)A reference variable defined to refer a particular variable can refer to any other variable alsoc)References must always be initialized inside classesd)A variable can have more than one referencesCorrect answer is option 'D'. Can you explain this answer?.
Solutions for Which of the following statement(s) is/are correct?a)* operator is used to declare a referenceb)A reference variable defined to refer a particular variable can refer to any other variable alsoc)References must always be initialized inside classesd)A variable can have more than one referencesCorrect answer is option 'D'. Can you explain this answer? in English & in Hindi are available as part of our courses for Class 7. Download more important topics, notes, lectures and mock test series for Class 7 Exam by signing up for free.
Here you can find the meaning of Which of the following statement(s) is/are correct?a)* operator is used to declare a referenceb)A reference variable defined to refer a particular variable can refer to any other variable alsoc)References must always be initialized inside classesd)A variable can have more than one referencesCorrect answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which of the following statement(s) is/are correct?a)* operator is used to declare a referenceb)A reference variable defined to refer a particular variable can refer to any other variable alsoc)References must always be initialized inside classesd)A variable can have more than one referencesCorrect answer is option 'D'. Can you explain this answer?, a detailed solution for Which of the following statement(s) is/are correct?a)* operator is used to declare a referenceb)A reference variable defined to refer a particular variable can refer to any other variable alsoc)References must always be initialized inside classesd)A variable can have more than one referencesCorrect answer is option 'D'. Can you explain this answer? has been provided alongside types of Which of the following statement(s) is/are correct?a)* operator is used to declare a referenceb)A reference variable defined to refer a particular variable can refer to any other variable alsoc)References must always be initialized inside classesd)A variable can have more than one referencesCorrect answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which of the following statement(s) is/are correct?a)* operator is used to declare a referenceb)A reference variable defined to refer a particular variable can refer to any other variable alsoc)References must always be initialized inside classesd)A variable can have more than one referencesCorrect answer is option 'D'. Can you explain this answer? tests, examples and also practice Class 7 tests.
Explore Courses for Class 7 exam

Top Courses for Class 7

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev