Hi Tclausex,
Thank you.
I have a somewhat decent Perl background and I am just learning C.
In Perl, we can do something as:
my @words = ();
Type: Posts; User: optimizer_777
Hi Tclausex,
Thank you.
I have a somewhat decent Perl background and I am just learning C.
In Perl, we can do something as:
my @words = ();
Hi,
I am trying to write a small program that counts the number of times a 1 letter, 2 letter, 3 letter, 4 letter etc. words occur and print the frequency of their occurance as:
1 letter - 1
2...
Hi,
I have a simple code as below (from K&R):
#include <stdio.h>
#include <stdlib.h>
// simple character counting
int main()
{
int c;
Tim,
Thank you.
If we change isdigit to isalpha, and change the atoi function to something as below:
char atoi(char s[])
{
int i, n, sign;
for (i = 0;...
iMalc, Thank you.
If my char s[] has a value as below:
char s[] = "-13572 468";
I see that the value returned is
-13572
Hi,
I am just trying to see how to run the atoi code on Page 61. I wrote the following but the below code prints just 0.
Can anyone please help? Thank you.
Note: I just want to thank the...
I am still not understanding why we need the following code in the above program:
for ( ; --lim > 0; w++) {
if (!isalnum(*w = getch())) {
...
Hi,
I changed it back to
while(isspace(c=getch()))
I see that the results are the same before and after changing the code back to
while(isspace(c=getch()))
Hi,
I am a beginner trying to learn C on my own. I am reading and running the programs in K&R. I am not able to clearly understand what is going on in the following program's getword function.
...
Hi friends,
I am new to C programming.
I am trying to run the following program from K&R pages 96 and 97, but it prints garbage. Can any one please help? What am I doing wrong?
Thank...