[Show all top banners]

MustaineKoFAN
Replies to this thread:

More by MustaineKoFAN
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 C++ Help
[VIEWED 4555 TIMES]
SAVE! for ease of future access.
Posted on 12-19-08 7:17 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

  ey Techguy Bro n thapa bro
Thnx for the post. Can you do me one more of a favor? I need this done man and I have no idea what C is all about..
1. What does the following code display?

int arr[4], i;
for (i=0; i<4; ++i)
    arr[i]=i+3;
cout<<endl;
for (i=0; i<4; ++i)
   cout<<setw(4) << arr[i];

cout<<endl;
for ( i=3; i >=0; --i)
    cout<<setw(4)  << arr[i];

2. Write a loop to display only the elements of d_array[10] having an even number subscript starting from zero..
3. Declare a two dimensional array, arr_2d, that contains 15 rows, each of which will store 12 integers

5. declare a string called birth_date that is to hold a date in the form of xx/xx/xx. code statements that prompts the user to enter his/her birth date in the form xx/xx/xx and place birth date into the string birth_date

6. Declare an array of character pointers that is initialized to point to the name of the months of the year..

 
Posted on 12-19-08 9:55 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Techguy has gone to Nepal. Now is the time that you do your homework yourself hehe. J/K
 
Posted on 12-19-08 10:56 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

dude if  you asking help for those simple questions in C and C++ and you dont have idea about declaring variable in C++ then you wont pass in Programming language class. Do some study before you post your homework and looking for sajha gurus.

good luck


 
Posted on 12-19-08 11:30 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Exactly...
I'm wondering why u even took this class..Anyway this could be of some help to you
1. Run the program and see the output(hope atleast u know how to compile and run)
2. I guess the second question means displaying the even numbers in the d_array[]
    so even numbers r mods of 2 .
    ie. divide by 2 and the remainder is 0
      I dont remember the exact syntax for mod in C++, i think its %.
     Write the code on ur own and let us know...we can see where u've done wrong.
 3. Do this on ur own.Post it..and we will tell u if thats right or wrong
4. where is 4?

5..  just declare a string...and do cin>>. let us know what u did.
 6. I'm bad with pointers that too in c++. This could be of some help
http://www.cplusplus.com/doc/tutorial/pointers.html
 
     
  

 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 60 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
Toilet paper or water?
Tourist Visa - Seeking Suggestions and Guidance
From Trump “I will revoke TPS, and deport them back to their country.”
advanced parole
ढ्याउ गर्दा दसैँको खसी गनाउच
To Sajha admin
Are Nepalese cheapstakes?
Nepali Psycho
MAGA denaturalization proposal!!
How to Retrieve a Copy of Domestic Violence Complaint???
wanna be ruled by stupid or an Idiot ?
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters