Computer Science, asked by hemantkumar2834, 10 months ago

Which of the following statements are valid?

Answers

Answered by DevendraLal
0

In this question, we are asked to tell which of the following statements is valid.

  • There is a separate type of data type that is used to hold the data in the programming languages C, C++, and Java. The two sorts of data that were used to answer the questions above are:
  • It is used to hold data of the integer data type. There are two varieties: long int and int.
  • The character data type (char data type) is used to store character data.
  • The long int variable in option 1 accepts the data from the int type variable. which is possible as they both have an integer data type.
  • Since both are of the integer data type, option 2's int variable can also accept data from the long int type variable.
  • Option 1 and Option 2 are therefore the proper choices because they properly compile, however, Option 3 is incorrect because—
  • Option 3 contains a char variable that uses data from an int-type variable, which is not possible because the two data types are different and result in a compilation error.
  • Option 4 has a compilation problem because the int variable attempts to use the data from the char type variable, which is not possible because they are of different data types.

CORRECT QUESTION-

Which of the following statements is valid?

1) long num1=10; int num2=num1.

2)int num1=10; long num2=num1.

3)int num1=65; char x= num1.

4)char x= 'a'; int num 1= x.​

#SPJ1

Answered by Rameshjangid
0

Answer:- (d) All of the above

You have not provided the full question and the topic clearly. So i am providing you answer as per my search in internet. It may varry from your book answer. To get a satisfied answer and to get an answer according to your book please provide full question next time.

The question i have searched and answered is:

Which of the following statements are valid?

(a) Lady Augusta is the first programmer.

(b) Adias is the daughter of Lord Byron, who is a famous English poet.

(c) ADA is a programming language, which is developed by US defense.

(d) All of the above.

So, this question's correct answer is option (d) All of the above statements are valid.

To know more about the given topic please go through the following

Link1:- https://brainly.in/question/26000729?

Link2:- https://brainly.in/question/7558131?

#SPJ1

Similar questions