473,496 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

programs


How do I write hese programs in c Iam a beginner learning c.
1.
write a program to read 2 inetegers with the following signficance th
first integer value represents a time of day on a 24hour clock, so tha
1245 represents quater to one mid-day for eg. The second intege
represents a time duration in a similar way, so that 345 represent
three hours & 45 minutes. This duration is to be added to the firs
time, and the result printed out in the same notation, in this cas
1630 which is the time 3hours and 45 minutes after 1245.
Typical output might be start time is 1415. Duration is 50 End time i
1505.

2.
write a function that takes 2 numbers in decimal format. The secon
number has to be lesser than 32. Right shift & left shift the firs
number by the second number and display the input & output (righ
shifted and left shifted) in binary format.

3.
Implement a file copy utility with silent and verbose mode.

Ash
-
ash464
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------

Nov 14 '05 #1
3 1169
ash4640 wrote:

How do I write hese programs in c Iam a beginner learning c.


In C, of course. You could use pen/pencil and paper, or a text editor on
a computer - actually, to _write_ a program, and not just enter it, you
should design it first. You have a pretty good spec here.

You can write it quickly, you can write it slowly. You can write
it simply, or in a complex fashion. Exactly how you go about writing
the program is entirely up to you. Ain't computers grand?
[homework assignment snipped]

Cheers!
Rich

Nov 14 '05 #2
ash4640 writes:
write a function that takes 2 numbers in decimal format. The second
number has to be lesser than 32. Right shift & left shift the first
number by the second number and display the input & output (right
shifted and left shifted) in binary format.


Set aside the requirement for binary output for now. What would the result
look like if the two input numbers were 123.456 and 2.3 after a right shift
with the output in decimal? Would this have any real world meaning? Keep
in mind that there is no mathematical function called "shift", it is a
computer term. And that decimal numbers are inherently stored in a
distinctly non-decimal form in computers unless you go to great lengths to
do otherwise.
Nov 14 '05 #3
Lazyness will lead you nowhere.

Do your homework yourself, it is the only way of learning.

Nov 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1865
by: bscofield | last post by:
Hi, I'm a db app. developer and I am re-writing some helps in javascript & HTML. The Javascript is for form flow and design and HTML just to display the helps. I use a seperate app. development...
12
3398
by: jrefactors | last post by:
If the C programs have UNIX system calls such as fork(), alarm(), etc.., we should call it UNIX programs, not traditional C programs? We couldn't compile the programs with system calls using VC++...
7
1712
by: Coca | last post by:
Hello, all I am working on a project that needs to convert OS/2 C60 programs into MS windows programs. And I found it difficult to find useful information. Could somebody kindly help me ? any...
2
1331
by: Jim Smith | last post by:
Hello everyone, I work for a large company that supports many websites. My manager wants everything rewritten in ASP.Net. He has given me the task to find out the best method for putting...
10
5715
by: www.hitechskill.com | last post by:
HiTechSkill.Com offers free information, tests, and sample interview questions that will help to improve your information technology skills. http://www.hitechskill.com
55
12737
by: Steve | last post by:
I have to develop several large and complex C++ hardware test programs that should work under DOS, most likely with 32-bit DOS extender. Development workstation OS would be Microsoft XP. Quite some...
10
2665
by: sasquatch | last post by:
X-No-Archive: Are there any good books that provide tips about how to understand and "play with" large C++ programs? It seems like a very important skill, and yet its hardly taught in the...
4
5520
Cyberdyne
by: Cyberdyne | last post by:
In your All Programs Menu, some of your programs are in alphabetical order and others are not. This makes it very difficult to seek out a program that may be hidden in a maze of program folders and...
1
1860
by: wstach | last post by:
Hi, I'm using Windows XP, IIS & ASP to develop a web service that executes several programs (command line .exe files) on a server, shows next webpage with info on progress in execution, and...
0
9929
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Programs dealing with autoruns Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list programs that help me to view/modify the autoruns...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7196
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7373
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.