RSS Forums RSS
Please support our C advertiser: Programming Forums
Views: 1137 | Replies: 5 | Thread Tools  Display Modes
Reply
Join Date: Sep 2005
Posts: 6
Reputation: balachandu is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
balachandu balachandu is offline Offline
Newbie Poster

Solution let it be solved

  #1  
Sep 14th, 2005
hai,

i want the basic differences in operation of MICROSOFT WORD document and NOTEPAD.

can any one please clarify this>?

2) in one program to select a random number between 0 to 5 i write a function as
random(0,5) ? but it is erroaneous as the system always selects 0 as the random number. how can i get random number other than zero?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 596
Reputation: SpS is on a distinguished road 
Rep Power: 5
Solved Threads: 31
SpS's Avatar
SpS SpS is offline Offline
Posting Pro

Re: let it be solved

  #2  
Sep 14th, 2005
Diffrence between word and notepad...i guess u r at wrong forum

for ur other question.....
use srand(time(0)) function...it will give u random number as a seed to rand() function
Reply With Quote  
Join Date: Aug 2005
Location: Oklahoma
Posts: 902
Reputation: chrisbliss18 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 23
chrisbliss18's Avatar
chrisbliss18 chrisbliss18 is offline Offline
Posting Shark

Re: let it be solved

  #3  
Sep 14th, 2005
You have asked about Notepad and Word twice now, but you not at all clear about what you want. Notepad and Word are completely different types of software. Notepad is just a basic text editor that doesn't support any type of text formatting. Word is a full-featured (*cough* bloated) text editor that supports the creation of advanced documents.

Now if you are asking about how the programs work programmatically, no one here will be able to answer that. In order to know how they work internally, you'd have to be familiar with the source. No one that works for Microsoft and has worked with the source for these programs will divulge the programs' internal operations on a public board.

Do you want to know how to write your own text editor similar to Notepad or Word?

You really must be more verbose about what you want. You need to ask us specific questions like "How do I make a text editor?" or "Are there any easy to use code modules that I can use to ease the creation of a text editor?"
Did we help you? Did we miss the point entirely? Update your thread and let us know.
Don't like the answers you are getting?
Did you try searching?
Clean up and optimize Windows 2000/XP
Reply With Quote  
Join Date: Sep 2005
Posts: 6
Reputation: balachandu is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
balachandu balachandu is offline Offline
Newbie Poster

Re: let it be solved

  #4  
Sep 17th, 2005
thank you for your kind suggestions dear chrissbliss.

now, i will come in your way .my doubt is if i want to develop a text editor which is some what similar to notepad .how can i ?

and if i want a text editor which is similar to word document.how can i ?

and for every implementation we need some basic data structures.

if we use arrays,linked lists,dobly linked lists, which can serve in resulting a good editor .

please send your reply .i always welcome your suggestions.

note that this is not my own question.it was asked in interview .

waiting for reply..........
Reply With Quote  
Join Date: Sep 2005
Posts: 6
Reputation: balachandu is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
balachandu balachandu is offline Offline
Newbie Poster

Re: let it be solved

  #5  
Sep 17th, 2005
actully i want to select 7 random numbers between 0 to 9.
but those generated should not be equal.
i tried by using ur srand(time(0)) but the system shows it is error

how can i get different random numbers.
give me the pseudocode plz....

waiting for ur reply...
Reply With Quote  
Join Date: Aug 2005
Posts: 596
Reputation: SpS is on a distinguished road 
Rep Power: 5
Solved Threads: 31
SpS's Avatar
SpS SpS is offline Offline
Posting Pro

Re: let it be solved

  #6  
Sep 18th, 2005
u need to include the header file stdlib and i guess time.h...for srand and time() function to work

whereas the logic part is concerned.....

generate a random number between 0 to 9
by using this....

srand(time(0));
ran=rand()%10;
and if you want that other number should not be same as any of the previous number generated then check every new random number with the previously generated number
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the C Forum
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:13 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC