C++ Qestions to Test Memory

C, C++, Visual C++, C++.Net Topics
Post Reply
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

C++ Qestions to Test Memory

Post by Nipuna » Thu Nov 18, 2010 8:03 pm

Hi Neo and Everybody

I like if you can Post Some Questions to Test My Knowledge.

Because I like to Test My Knowledge with Professionals. :)

I have learned till Constants. I like Questions till that.


Thanks
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: C++ Qestions to Test Memory

Post by Neo » Fri Nov 19, 2010 1:40 am

To write a good programme, it is good to learn up to control blocks like loops, if/else, etc... So my idea is, since you are still in the very beginning, you better proceed further at least up to loops.

See these exercises and see what you can do. Since G-SparkZ is also up to a level you both need to discuss and exchange ideas, etc... This will help you guys to learn in a competitive environment just as in a game.

http://en.wikibooks.org/wiki/C++_Progra ... _and_types
http://www.cplusplus.com/forum/articles/12974/
http://issc.uj.ac.za/appliedmaths/excpp.html
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: C++ Qestions to Test Memory

Post by Nipuna » Fri Nov 19, 2010 8:04 am

Hey Thanks Neo. I searched the Net Before Trouble you :) but I couldn't find good Exercises like that you gave me.

Thanks
User avatar
isuru.forum
Posts: 2
Joined: Sat Nov 20, 2010 10:41 am

Re: C++ Qestions to Test Memory

Post by isuru.forum » Sat Nov 20, 2010 11:03 am

Thank dude for the exam site really helped me :)
Last edited by Neo on Sat Nov 20, 2010 11:14 am, edited 1 time in total.
Reason: Link removed by admin
User avatar
Nipuna
Moderator
Moderator
Posts: 2729
Joined: Mon Jan 04, 2010 8:02 pm
Location: Deraniyagala,SRI LANKA

Re: C++ Qestions to Test Memory

Post by Nipuna » Sat Nov 20, 2010 9:49 pm

Hey Buddy

Today After a Freelancer Project, I decided to take a Look at Wiki Programing Question you gave me and I made a Little Program for the First Question

Code: Select all

#include<iostream>
using namespace std;
int main ()
{
    int width,length,area,perimeter;
    cout<<" Rectangle Area and perimeter Calculator by Nipuna  " <<endl<<endl;
    cout<<"enter width :-";
    cin>>width;
    cout<<"enter length:-";
    cin>>length;
    area=width*length;
    cout<<"Area of the Rectangle :-" <<area<<endl;
    perimeter=width+width+length+length;
    cout<<"perimeter of the Rectangle :- "<<perimeter;
    cin.get();
    cin.get();
    return 0;
}
And It is Working.

Then I looked at Answers They are Bit different from my Program :)

I did this Only to Check my Memory. Because I didn't have time in these days to learn. and I am Happy with It (With My Work) :)

I attached the Compiled Byte Code too. I don't Know is byte code the right Word But I think it is. if I am Wrong Kindly correct Me. :)

Oh Sorry ROBOT.LK don't let me to add .EXE files.

Thanks
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: C++ Qestions to Test Memory

Post by Neo » Sat Nov 20, 2010 9:55 pm

Great. If you follow the whole tutorial and complete all the questions in the exercises, I'm sure you'll become a very good programmer.

Add some blank lines between each function, so it will be easier to read. It is very important to write a programme in a way that can be read by any programmer quite easily. We call this Readability of a programme.
I attached the Compiled Byte Code too.
It is okay. You can simply refer, executable file.
Oh Sorry ROBOT.LK don't let me to add .EXE files.
I think source code is more than enough...
User avatar
isuru.forum
Posts: 2
Joined: Sat Nov 20, 2010 10:41 am

Re: C++ Qestions to Test Memory

Post by isuru.forum » Sat Nov 20, 2010 9:58 pm

Dude I am not an IT pro.. I am planning of taking a Java Course in PCJT.... and currently just making some small programs using a bit of C++ in Visual studio 2008. Not Big Stuff but small Physics Calculations Programs.... :)
Last edited by Neo on Sat Nov 20, 2010 10:02 pm, edited 1 time in total.
Reason: Link removed by admin
Post Reply

Return to “C/C++ Programming”