GIDForums  

Go Back   GIDForums > Computer Programming Forums > CPP / C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Jan-2008, 06:37
frankie123 frankie123 is offline
New Member
 
Join Date: Jan 2008
Posts: 2
frankie123 is on a distinguished road
Exclamation

Various C questions


Following are some questions I need answers for

Please explain your answers

char my_char;
int my_ int, a,b,c;
char my_string[200];
char* my_c_ptr;

1.
my_char = "5423585969770"[my_int];

a. my_char must be replaced by my_c_ptr
b. the C syntax is not correct
c. my_char is assigned to point to a character array of size my_int containing text 5423585969770.
d. my_char should be replaced by my_string
e. other


2.
enum { one, two, three };

a. two has value of 3
b. structure called enum is defined containing 3 elements
c. three has a value of 1 greater than two done , two , three need to be predefined


3.
a = b = c == 5;

a. is equivalent to ((a=b)=c) ==5
b. the syntax is not correct
c. a and b will be assigned a value of either 0 or 1
d. a, b , c are all assigned 5
  #2  
Old 08-Jan-2008, 10:49
Howard_L Howard_L is online now
Regular Member
 
Join Date: Apr 2007
Location: Maryland/PA, USA
Posts: 406
Howard_L has a spectacular aura aboutHoward_L has a spectacular aura about

Re: Emergency !!! C Questions . require answers


The answers are YES , YES , and YES , you will find the answers here: cplusplus.com/doc/tutorial/ . . . or quite possibly in a book. Try it. (unbelievable)
  #3  
Old 08-Jan-2008, 12:09
frankie123 frankie123 is offline
New Member
 
Join Date: Jan 2008
Posts: 2
frankie123 is on a distinguished road

require answers


First of all I know the answers.

1. ans (d) my_char is assigned a Hexadecimal character representation of my_int

2. ans (c)

3. ans(c)

I searched myself for a long time and got it . thanks .
 
 

Recent GIDBlogNARMY by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
List of programming related questions juvenile386 Miscellaneous Programming Forum 4 05-Jul-2007 07:49
Help with PHP survey batalia MySQL / PHP Forum 0 14-Nov-2006 20:13
A few questions for someone in the programming industry. WAEvans Miscellaneous Programming Forum 0 08-Oct-2006 09:19
Help Required in coding for these questions in C-URGENT!! maddy_u2002 C Programming Language 3 23-Sep-2006 10:06

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 23:34.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.