|
by: arnuld |
last post by:
this is the example programme from that section. it does not print the
longest line otherwise it works fine, my version has only 1 extra line
of "printf". i want to know why it is not printing the longest line:
/* K&R2 section 1.9 character arrays
example programme
STATEMENT: to take number of lines as input and print the longest line
|
by: arnuld |
last post by:
there is a solution on "clc-wiki" for exercise 1.17 of K&R2:
http://clc-wiki.net/wiki/K%26R2_solutions:Chapter_1:Exercise_17
i see this uses pointers whereas K&R2 have not discussed pointers yet.
i have created a solution myself by modifying the example programme of
section 1.19.
i tried to find the source-code of K&R2 using Google. i found the home
|
by: arnuld |
last post by:
i have created a solutions myself. it compiles without any trouble
and runs but it prints some strange characters. i am not able to find
where is the trouble.
--------------------------------- PROGRAMME
--------------------------------
/* K&R2 section 1.9
exercise 1.19
|
by: arnuld |
last post by:
this is the programme which converts a string of digits into its
numeric equivalent, given in section 2.7:
/* atoi: convert s to integer */
int atoi(char s)
{
int i, n;
n = 0;
for (i = 0; s >= '0' && s <= '9'; ++i)
|
by: arnuld |
last post by:
this is exercise 2-3 from the mentioned section. i have created a
solution for it but i see errors and i tried to correct them but still
they are there and mostly are out of my head:
------------------------------- PROGRAMME --------------------------
/* Section 2.7 type conversions
we are asked to write a function "htoi(an array)" that accomplishes
this:
|
|
by: arnuld |
last post by:
i have created solution which compiles and runs without any error/
warning but it does not work. i am not able to understand why. i
thought it is good to post my code here for correction before looking
at CLC-Wiki for K&R2 solutions:
--------------- PROGRAMME ------------
/* K&R2 section 1.5.3, exercise 1-9
STATEMENT:
write a programme to copy its input to output replacing
|
by: arnuld |
last post by:
this programme runs without any error but it does not do what i want
it to do:
------------- PROGRAMME --------------
/* K&R2, section 1.6 Arrays; Exercise 1-13.
STATEMENT:
Write a program to print a histogram of the lengths of words in its
input.
It is easy to draw the histogram with the bars horizontal; a vertical
|
by: arnuld |
last post by:
i am not able to make it work. it compiles without any error but does
not work:
what i WANTED:
1.) 1st we will take the input in to an array. (calling "getline" in
"main")
2.) we will print that input array on terminal. (in "main")
3.) we will reverse the array. (calling "reverse" in "main")
4.) we will print that reversed array. (in "main")
|
by: arnuld |
last post by:
there are no compile-time errors or warning. it runs but it does not
do what it is supposed to.
WANTED: to print the "input C programme" with all comments removed.
GOT: does not print anything.
-------- PROGRAMME -----------
/* K&R2: exercise 1-23
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|