Education logo

About C Programming

C programming using procedural language, portability, speed and general purpose

By hussein hassaninPublished 9 months ago 4 min read

19 About C Programming:

Question 1: Tell us about C programming using procedural language, portability, speed and general purpose?

• Procedural Language - Instructions in a C program are executed step by step.

• Portable - You can move C programs from one platform to another, and run it without any or minimal changes.

• Speed - C programming is faster than most programming languages like Java, Python, etc.

• General Purpose - C programming can be used to develop operating systems, embedded systems, databases, and so on.

-----------------------------------------

programming language, with Ken Thompson.

Question 2: Talk about the programming language from Ken Toson’s point of view?

C is an imperative, procedural language in the ALGOL tradition.

1- It has a static type system. In C, all executable code is contained within subroutines (also called "functions", though not in the sense of functional programming).

2- Function parameters are passed by value, although arrays are passed as pointers, i.e. the address of the first item in the array.

3- Pass-by-reference is simulated in C by explicitly passing pointers to the thing being referenced.

4- C program source text is free-form code. 5-Semicolons terminate statements, while curly braces are used to group statements into blocks.

------------------------------------------

The C language also exhibits the following characteristics:

Question 3: What are the characteristics of the C programming language?

1-The language has a small, fixed number of keywords, including a full set of control flow primitives: if/else, for, do/while, while, and switch.

2-User-defined names are not distinguished from keywords by any kind of sigil.

3- It has a large number of arithmetic, bitwise, and logic operators: +,+=,++,&,||, etc.

3- More than one assignment may be performed in a single statement.

-----------------------

Functions:

Question 4: Talk in detail about the tasks of the C programming language?

1- Function return values can be ignored, when not needed.

2- Function and data pointers permit ad hoc run-time polymorphism.

3- Functions may not be defined within the lexical scope of other functions.

4- Variables may be defined within a function, with scope.

5- A function may call itself, so recursion is supported.

6- Data typing is static, but weakly enforced; all data has a type, but implicit conversions are possible.

User-defined (typedef) and compound types are possible.

7- Heterogeneous aggregate data types (struct) allow related data elements to be accessed and assigned as a unit.

8- The contents of whole structs cannot be compared using a single built-in operator (the elements must be compared individually).

9- Union is a structure with overlapping members; only the last member stored is valid.

10- Array indexing is a secondary notation, defined in terms of pointer arithmetic.

11- Whole arrays cannot be assigned or compared using a single built-in operator.

12- There is no "array" keyword in use or definition; instead, square brackets indicate arrays syntactically, for example month.

13- Enumerated types are possible with the enum keyword.

14- They are freely interconvertible with integers.

Strings are not a distinct data type, but are conventionally implemented as null-terminated character arrays.

15- Low-level access to computer memory is possible by converting machine addresses to pointers.

16- Procedures (subroutines not returning values) are a special case of function, with an empty return type void.

17- Memory can be allocated to a program with calls to library routines.

18- A preprocessor performs macro definition, source code file inclusion, and conditional compilation.

-------------------------

There is a basic form of modularity:

Question 5: Talk about the basic form of C programming units?

1- files can be compiled separately and linked together, with control over which functions and data objects are visible to other files via static and extern attributes.

2- Complex functionality such as I/O, string manipulation, and mathematical functions are consistently delegated to library routines.

3- The generated code after compilation has relatively straightforward needs on the underlying platform, which makes it suitable for creating operating systems and for use in embedded systems.

4- While C does not include certain features found in other languages (such as object orientation and garbage collection), these can be implemented or emulated, often through the use of external libraries (e.g., the GLib Object System or the Boehm garbage collector).

----------------------

Relations to other languages:

Question 6: Are there other relationships with the C programming language?

1- Many later languages have borrowed directly or indirectly from C, including C++, C#, Unix's C shell, D, Go, Java, JavaScript (including transpilers), Julia, Limbo, LPC, Objective-C, Perl, PHP, Python, Ruby, Rust, Swift, Verilog and SystemVerilog (hardware description languages).

2-These languages have drawn many of their control structures and other basic features from C. Most of them (Python being a dramatic exception) also express highly similar syntax to C, and they tend to combine the recognizable expression and statement syntax of C with underlying type systems, data models, and semantics that can be radically different.

---------------------------------------------

Hussein Hassanin.

Writer and Researcher.

student

About the Creator

hussein hassanin

my name is Hussein hassann , I am a freelance writer , and researcher ..

I have been carried out several researches . mainly history , science and technology ..

.

Enjoyed the story?
Support the Creator.

Subscribe for free to receive all their stories in your feed. You could also pledge your support or give them a one-off tip, letting them know you appreciate their work.

Subscribe For Free

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

    hussein hassaninWritten by hussein hassanin

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.