title: objective-c  fetching array elements?
body: <p>this line of code gives the ans. 2 (which is right)</p>
  
  <pre><code>int def = arc4random() % 2;
  NSLog(@"%@",[uniqueNumbers objectAtIndex:def]);
  </code></pre>
  
  <p>but when i use</p>
  
  <pre><code>int def = arc4random() % 2;
  //NSLog(@"%@",[uniqueNumbers objectAtIndex:def]);
  c1 = (int)[uniqueNumbers objectAtIndex:def];
  NSLog(@"%d", c1);
  </code></pre>
  
  <p>it gives 115669616. where c1 is an integer. what is the problem?</p>