Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C - C++ Learning > Re: C++ Puzzle ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 4295 of 4370
Post > Topic >>

Re: C++ Puzzle from Meebo page

by ram@[EMAIL PROTECTED] (Stefan Ram) Oct 6, 2008 at 09:51 PM

Fallen Angel <milkyway8754@[EMAIL PROTECTED]
> writes:
>1. With these variable declarations: int i, j[10], *k;
>Which of the following are legal?
>a. i = *(&(j[2]) + 1);
>b. k = &(j[1]);
>c. i = &(j[2]) + 1;

  »int i, j[10], *k;« is only /one/ declaration, consisting of
  the decl-specifier-seq »int«, the init-declarator-list 
  »int i, j[10], *k«, and a semicolon »;«.

  A C++ program might be syntactically correct, but might have
  implementation specified or undefined behavior. 
  It is not obvious what the term »legal« refers to.

  Also, I do not see a »puzzle« but just a multiple-choice
  question. A puzzle would require to find some solution,
  not just to select one from one of eight possible answers.
 




 1 Posts in Topic:
Re: C++ Puzzle from Meebo page
ram@[EMAIL PROTECTED] (S  2008-10-06 21:51:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 15:19:03 CST 2008.