csev / cc4e Goto Github PK
View Code? Open in Web Editor NEWC Programming for Everybody
Home Page: https://www.cc4e.com/
License: Other
C Programming for Everybody
Home Page: https://www.cc4e.com/
License: Other
https://www.cc4e.com/lessons_launch/cc4e_00_quiz
"A couple of typos in the chapter 0 quiz: - Q16, Linux is incorrectly spelled as Lunix. - Q19, Linux is incorrectly spelled as Liunx."
Maybe one is a trick answer?
Is it a blank page? Or is it missing? File page_178.jpg
Thanks and keep up the good work!
According to the test I did on my Mac, there is an issue related with the C code you present.
scanf is not stoping you to input more than 100 chars on name, and if you want to get 100 chars you need to define the name var with 101 length.
Couldn't find the page/code for this.
https://www.cc4e.com/lessons/core
Quiz: Types, Operators, and Expressions
(a) Q7
If the result of the logical expression (12>10) is assignmed to an integer variable in C, what is the value that is assigned?
Typo - is assignmed
Correct answer is expected to be 1 as, 12 > greater than 10, true (would be 0 if false.
Accepted as correct is 0, False.
K&R pg 189 appendix A 7.6 relational operators.
1 discussion report the question option is "\1". A browser render/typo in source issue?
(b) Q12
Since ANSI C does not have a predevined value for 'true', which of these is the most "correct" way to define a true value in ANSI C code?
typo - predevined
typo - #define TRUE (1)
Correct answer would be a non 0 value, that is 1 according to lessons.
Marked as wrong, the TRUE (1). The correct answer is TRUE (0==0) makes sense to me. I've seen this before. Using gcc -ansi to test. Both of those return 1 i.e. non 0 so either would be right.
I stumbled upon the typo with the first then in this sentence
Line 1 in 39b7cde
Not being a native English speaker I was not sure if it should be:
By now, you know when the authors mention the PDP-11
or
By now, you know that when the authors mention the PDP-11
And asked ChatGPT, which came up with some additional suggestions that make sense, IMHO:
Yes, there are a few issues with the sentence you provided. Here's a revised version:
"By now, you know that when the authors mention the PDP-11, they are discussing the challenge of making C work on previous generation computers with short memory words and small amounts of memory, while simultaneously ensuring its compatibility with the incoming generation of computers with larger words and more memory."
This revision clarifies the relationship between the mention of the PDP-11 and the challenge of making C work on different generations of computers. It also improves the overall clarity and structure of the sentence.
https://www.cc4e.com/mod/gift/?quiz=chap05.txt
Warning
The asterisk(*) is the correct answer, but is interpreted as incorrect.
The Profile picture of young Dr.Chuck is having cc4e.com as the link instead of access to the full sized picture
Reported in Coursera version.
https://www.coursera.org/learn/exploring-c/discussions/forums/2XEEzmReEe6hqQqbSjqy1w/threads/KW5gBKOjEe67HQrbxnFcjw
Assignment
cc4e/tools/ccauto/1-04-celsius.php
Expected output in grader example,
This is very similar to ex-1-03 but without the heading ending '\n', which is aligned.
https://www.cc4e.com/mod/gift/index.php?PHPSESSID=
The 2nd part is the end of,
Hey Dr. Chuck,
I'm from your SI311. In my computer, I turn on the darkmode on everything due to my eyes' condition. However, it doesn't quite work when I'm reading the C Language textbook from my browser. I have tried using the "Read Mode" and different plug-ins, but it doesn't load the comment section of the book. I think this is because the source code indicates that you importing content from another md file.
I have to manually change the html styles in my console, which works pretty well:
document.querySelector("body").style.color = "#ffffff"
document.querySelector("body").style.backgroundColor = "#192734"
Do you have any recommendation on enabling darkmode? Or this could be a potential feature to implement?
Taking in account C code and the Output, you have a typo on Python side:
print('x',3.5,'i',10)
must be:
print('x',3.5,'i',100)
K&R 2: Types, Operators, and Expressions should link to the K&R video about Chapter 2, but currently links to Chapter 1.
Section 3.9 of the book is called Goto's and Labels, which seems to be grammatically incorrect. However, since the title of corresponding section in the original book is Goto and Labels, it should be corrected either way.
4.8 Block Structure
being followed by
4.10 Recursion
The FOR-statement is not a complete block.
Appendix A seems to be missing.
I read the book with great pleasure :-)
As you are in the process of creating and testing the "tools", perhaps the following will help you
chapter 1 quiz:
In question 22 "Whay does the ..." -> What...
chapter 2 quiz:
question 1: "int must ... iin length" -> ... in ...
question 8: "None of the above" answer doesn't always appear last, maybe it should be "None of the rest"
question 10: none of the given answers are correct for j, should 42 be 2?
Hope that helps you,
Great work!!
if you compare *s++ == *t++ you will never asign t to s. The == should be =
strcpy(s, t) /* copy t to s; pointer version 3 - corrected*/
char *s, *t;
{
while (*s++ = *t++)
;
}
<h2>1.1 Getting Started</h2>
, we will have to do <h2 id="getting-started">1.1 Getting Started</h2>
or <h2 id="1.1">1.1 Getting Started</h2>
, if we can change the html so that all h2's have an id, we can link the sub headings in Table of Contents to URLs like this https://cc4e.com/book/chap01.md#1.1 or https://cc4e.com/book/chap01.md#getting-startedDeclaring a C function as you present is not supported anymore.
int mymult( a, b)
int a, b;
{
...
}
βmustβ be:
int mymult( int a, int b) {
...
}
From my Mac cc I got the following "warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x"
The login session expiry duration for www.cc4e.com is very short. While working on my assignment, I encountered an issue where I lost all my code because of the session expiry. I believe there should be a mechanism in place to automatically save the code every few seconds to prevent such incidents. Thank you.
Student report, cc4e/lectures/KR-1.pptx. My edit in (...).
With deep respect for Dr. Chuck.
In reviewing the presentation, I found the following errors:
%s\\n
) is inserted in line 7 which breaks the '\n' operatorint i, len=0;
to int i;
for(i=0;self[i];i++) len=i;
to for(i=0;self[i];i++);
for(i=0; self[i]; i++);
While working through the CC4E online C programming course, I encountered a challenge with the exercise RS-8 , specifically related to understanding the pre-validation error messages.
The message "NOT GRADED: You need to read the input." was displayed.
I was using gets() to read the input as I had adapted my code from exercise RS-7.
This led to some confusion because RS-7 was quite similar and explicitly requires the use of gets() and the lecture notes and problem statement did not specify the use of scanf() for RS-8.
I found the validation code on:
# cc4e/tools/ccauto/rs-08-guess.php
# line: 81
function ccauto_require($LAUNCH) {
return array(
array('scanf', 'You need to read the input.'),
array('while', 'You need to read the input until the user gets the correct guess.'),
array('else if', 'This application is best solved using a multi-way if statement (i.e. else if).'),
);
}
I propose updating the pre-validation message to be more explicit in this case.
For example, changing the message to "You need to read the input. (Use scanf)".
I am willing to contribute to this improvement by creating a pull request with the suggested change to the pre-validation message.
Thank you for considering this suggestion. I look forward to any feedback or thoughts on this proposal.
Would it be possible for you to add to the repo the original scanned images of the book pages, without any image processing?
It appears that the scanned pages are heavily processed, most likely to prepare them for OCR. i.e. all anti-aliasing has been removed and only hard-edged black characters on white background remain.
So, when reading the original book pages, which can be quite enjoyable, is it made less enjoyable by that harsh text.
Thanks for you time.
Multiple posts. Exercise RS-8: Write a C program
https://www.cc4e.com/tools/ccauto/index.php?PHPSESSID=
The Run Code button isn't working, Reset Code does. To the right-hand side of Reset Code is a little spinner, going for 8 minutes now.
All exercises at - https://www.cc4e.com/lessons/python , picking at random - Object Oriented Programming section 9/13 Implement a Python str class
A posted solution - "For all of the exercises, the "Run Code" button is greyed out and I have to edit the HTML in the Inspect Element section of my browser to remove the "disabled" tag on the button in order to submit my exercises."
Another 2 threads, one post is, 12 days ago
this should do: document.getElementById("runcode").removeAttribute("disabled")
For cc4e.com, in the discussions.
Lesson 11/13 - Tree Maps and Hash Maps
Tools:
Quiz: Tree Maps and Hash Maps
https://www.cc4e.com/lessons_launch/cc_05_quiz
Click on link,
Welcome Stephen Catto from C Programming for Everybody (Instructor)
This quiz has not yet been configured
The same quiz doesn't appear in the course 4 week 6 Coursera version.
https://www.coursera.org/learn/building-objects-in-c/home/week/6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.