Contact: +6017-761 9288
Assessment Rubric:
Test (30%)
Project (70%)
(There is NO turnitin requirement for this unit)
Project Submission Checklist:
Documentation
Powerpoint slides
Source file
Data file used in your project
You are free to use any editor you like. There is no restriction of the editor.
If you don't like the in-built Eclipse editor. You may use Notepad++ to help you export/import your program.
I have some of the study guide codes (the corrected version). You can get it from me in class.
I have a incomplete c program sample from the textbook. You can get it from me directly.
Eclipse Setup with GCC
Use the following link for the complete Eclipse setup process, including the testing of your Eclipse configuration.
https://sites.google.com/site/jetweelim/home/academiccorner/other/eclipse-c-programming
Code::Block Setup with GCC
Some student prefer to use Code::Block due to familiarity. In this case use the following link:
https://sites.google.com/site/jetweelim/home/academiccorner/other/codeblock-setup-for-c-programming
Eclipse C Compiler - Known Issue
- clrscr() function produce a compile error of "undefined reference to `clrscr'"
Solution: #include <stdlib.h> and replace the clrscr(); with system("cls"); This should work for Windows.
- void main(void) produce an error "warning: return type of 'main' is not 'int'"
Solution: include the stdlib, use int main(void) and at the end return EXIT_SUCCESS;
Known Issue
-Eclipse may NOT work on non-English Windows OS machine.
-Eclipse produce a insufficient privilege to write. Save your work and restart Eclipse.
-Mouse hang - with the different architecture. Pls do save often.
Tentative Lesson Plan:
Lesson 1: Introduction
Lesson 2: C Program
Lesson 3: Selection Structure
Lesson 4: Iteration
Lesson 5: Function
Lesson 6: Array
Lesson 7: String
Lesson 8: File
Lesson 9: Record-Based Data
Chapter 1
Why C language?
C language has high performance and there a quite a number of kernel hackers.
For the C data type and range
http://4.bp.blogspot.com/_uIwyaTjqYYw/TU5Eju6N35I/AAAAAAAABTM/MQjJhneD1zA/s640/10.jpeg
Chapter 3
In a switch-case, the case clause ends with a :
Chapter 6
Array is a data structure much like a list. It can store a number of data of the same data-type.
Chapter 7
//String to integer conversion program
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
char x[10] = "23";
int result = atoi(x);
printf("integer value of the string is %d\n", result);
}
Error Message of Implicit Declaration of Function
Project FAQ
Q: Is it compulsory to use file in the project?
A: Yes, it is compulsory to use file in the project. However, you may either choose to use text file or binary file. Text file is simpler.
Q: Is it compulsory to use struc[ure] in the project?
A: No, you can options to just use variables in place of structure.
Q: How many testing should I do?
A: To get the full mark, you need at least 35 test cases.
Q: Is it compulsory to use binary file format?
A: No. If you want to keep your project simple, you can just use text file for your project.
Q: How does a Flowchart look like?
A: Here's a sample
Common Conversion Specifier
%d decimal
%i integer
%f floating-point
%c character
%s string
---
The following is your marking allocation for this unit.
*Note: CRT form is optional.
Regards,