No products in the cart.

Give the output of the following …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Give the output of the following program : void main() { int x[ ]={10,20,30,40,50}; int *p, **q, *t ; p=x; t=x+1; q=&t; cout<<*p<<","<<**q<<","<<*t++; }
  • 2 answers

Muskan Goyal 5 years, 7 months ago

Okay. Thanks for the help.. :-)

Liton Barman 5 years, 7 months ago

According to the standard c or c++ , the statement you written ( p=x; ) is a grammatical error, so their will be compile time error, because you are trying to allocate the value or data store in the variable x[0] to the variable y which is a pointer. Correct statement : p=&x; or for another approach *p=x; ( one suggestion for you, if you really wanted to be a programmer in future don't use c++ book written by Sumita Arora, it has many errors in it and also do not contain the basic approaches of programming in c++) Thankyou.
http://mycbseguide.com/examin8/

Related Questions

What are called tokens
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App