Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

C Do C language still relevant for 2023?, Not a programmer, just curious noob.

views
     
TSujah
post Oct 21 2022, 03:17 PM, updated 4y ago

Casual
***
Junior Member
357 posts

Joined: May 2008
From: Kajang, Selangor


...and do C language still worth learning? especially in Malaysia.

asking for educational purpose. not really about finding job.
Buffalo Soldier
post Oct 21 2022, 03:32 PM

Casual
***
Junior Member
445 posts

Joined: Aug 2005
QUOTE(ujah @ Oct 21 2022, 03:17 PM)
...and do C language still worth learning? especially in Malaysia.

asking for educational purpose. not really about finding job.
*
1. In education? Yes, to understand the underlying mechanism
2. Direct usage in life application in work environment? Very rarely, unless work related to OS, hardware (driver), embedded system.

In general, should student still learn? I'm learning a bit toward yes. So that they still have an understanding of how things work without all the layers and layers of abstraction.
angch
post Oct 21 2022, 04:08 PM

On my way
****
Junior Member
636 posts

Joined: Jul 2006
Well, if anyone wanna play around with Arduino either as a hobby or for work, you'd still need C/C++.
TSujah
post Oct 21 2022, 05:40 PM

Casual
***
Junior Member
357 posts

Joined: May 2008
From: Kajang, Selangor


QUOTE(Buffalo Soldier @ Oct 21 2022, 04:32 PM)
1. In education? Yes, to understand the underlying mechanism
2. Direct usage in life application in work environment? Very rarely, unless work related to OS, hardware (driver), embedded system.

In general, should student still learn? I'm learning a bit toward yes. So that they still have an understanding of how things work without all the layers and layers of abstraction.
*
I see, basically good for understanding working with hardware and OS back forth.
The reason i ask because just heard from other people say learning c programming can teach fundamental and easier

Thanks for information
TSujah
post Oct 21 2022, 05:42 PM

Casual
***
Junior Member
357 posts

Joined: May 2008
From: Kajang, Selangor


QUOTE(angch @ Oct 21 2022, 05:08 PM)
Well, if anyone wanna play around with Arduino either as a hobby or for work, you'd still need C/C++.
*
Good to hear, i also really wanted to learn Ardunio to make cool home project stuff with anak buah dan kawan.

Thanks!

This post has been edited by ujah: Dec 16 2022, 11:12 PM
Amaru
post Oct 22 2022, 02:51 PM

Regular
******
Senior Member
1,050 posts

Joined: Nov 2007
If you think you'll ever be interested in game programming, yes.
A lot of APIs like SDL2 need C (or C++)


boo1977
post Oct 22 2022, 05:33 PM

New Member
*
Validating
17 posts

Joined: Jul 2022
QUOTE(Amaru @ Oct 22 2022, 02:51 PM)
If you think you'll ever be interested in game programming, yes.
A lot of APIs like SDL2 need C (or C++)
*
Yeah, true. For example, I came across this shader code in C for SDL 1.2:

» Click to show Spoiler - click again to hide... «


hmm.gif
junyian
post Oct 22 2022, 06:15 PM

Casual
***
Junior Member
401 posts

Joined: Jan 2003


C code in assembly?? biggrin.gif
FlierMate11
post Oct 22 2022, 07:02 PM

New Member
*
Validating
17 posts

Joined: Oct 2022
QUOTE(junyian @ Oct 22 2022, 06:15 PM)
C code in assembly?? biggrin.gif
*
Yeah, the entire original code is in C, but a Russian coder couldn't manage to convert "fragment_shader_source" from C to Assembly.

It is called as below:

CODE
       mov     r14,rax                                ;r14 = shader
       lea     rbx,[fragment_shader_source]
       push    rbx
       invoke  glShaderSource,r14,1,rsp,0
       pop     rbx


It links to interpreter:

CODE
segment interpreter readable
                               db '/lib64/ld-linux-x86-64.so.2'
       strtab:                 db 0

       _sdl                    db 'libSDL-1.2.so.0',0
       _gl                     db 'libGL.so.1',0


Nice eyes.
silverhawk
post Oct 22 2022, 11:15 PM

Eyes on Target
Group Icon
Elite
4,956 posts

Joined: Jan 2003


Yes, do learn it and try to code some stuff in it. You will learn a lot of necessary fundamentals in programming and will also make you understand/apprecieate other languages more as well.


15cm
post Oct 23 2022, 07:21 PM

Casual
***
Junior Member
423 posts

Joined: Apr 2022
yes for electronics
TSujah
post Oct 24 2022, 11:43 AM

Casual
***
Junior Member
357 posts

Joined: May 2008
From: Kajang, Selangor


QUOTE(silverhawk @ Oct 23 2022, 12:15 AM)
Yes, do learn it and try to code some stuff in it. You will learn a lot of necessary fundamentals in programming and will also make you understand/apprecieate other languages more as well.
*
Do you have suggestion what tutorial or small project to get start learn?
TSujah
post Oct 24 2022, 11:44 AM

Casual
***
Junior Member
357 posts

Joined: May 2008
From: Kajang, Selangor


QUOTE(15cm @ Oct 23 2022, 08:21 PM)
yes for electronics
*
Ardunio & Rasberry Pi?
kingkingyyk
post Oct 24 2022, 06:03 PM

10k Club
Group Icon
Elite
15,694 posts

Joined: Mar 2008
QUOTE(ujah @ Oct 21 2022, 05:42 PM)
Good to hear, i also really wanted to learn Ardunio to make cool home project stuff with anak buah.

Thanks!
*
Unfortunately with faster microcontrollers (i.e. RP2040/STM32/ESP8266/ESP32) flooding the markets, MicroPython is slowly taking over the starter segment.

C/C++ pretty much stays at low level/high performance programming for now, and likely be replaced by Rust.
Many consumer-facing projects are asking for faster development time and doesn't care much about resource usage and performance as long as they are scalable across different instances when demand rises. This doesn't favor C/C++.

This post has been edited by kingkingyyk: Oct 24 2022, 06:07 PM
Ethan_Rob
post Oct 25 2022, 09:19 AM

Getting Started
**
Junior Member
53 posts

Joined: Sep 2022


Compared to Java and Python, C language is used less in work.
flashang
post Oct 26 2022, 08:23 PM

Casual
***
Junior Member
355 posts

Joined: Aug 2021


you will still need c when do some debug or expand on library / module, which most of them are written in c / c++.

smile.gif


FlierMate11
post Oct 26 2022, 10:36 PM

New Member
*
Validating
17 posts

Joined: Oct 2022
A question for C coders:

CODE

#include <stdio.h>
int main() {
 int x = 1, y = 0, z = 5;
 int a = x && y || z++;
 printf("%d", z);
 return 0;
}


What will be the output of C program above?

Options:
a) 0
b) 4
c) 5
d) 6
e) Compile error

devil.gif
FlierMate11
post Oct 26 2022, 10:41 PM

New Member
*
Validating
17 posts

Joined: Oct 2022
One more:

CODE

#include <stdio.h>
int main() {
 int c = 0;
 if (c)
     printf("%d", c = 0);
 else
     printf("%d", c = 1);

 printf("%d\n", c);
 return 0;
}


What will be the output of C program above?

Options:
a) 00
b) 11
c) 10
d) 01
e) Compile error

sweat.gif
angch
post Oct 26 2022, 11:54 PM

On my way
****
Junior Member
636 posts

Joined: Jul 2006
QUOTE(FlierMate11 @ Oct 26 2022, 10:36 PM)
A question for C coders:

CODE

#include <stdio.h>
int main() {
 int x = 1, y = 0, z = 5;
 int a = x && y || z++;
 printf("%d", z);
 return 0;
}


What will be the output of C program above?

Options:
a) 0
b) 4
c) 5
d) 6
e) Compile error

devil.gif
*
Not too hard. 6. Did it without cheating, and it's been years since I touched C. z++ is a eval then increment. Confirmed via testing it.

Modern compilers just warn that you that "Value stored to 'a' during its initialization is never read"

The other one is "11", because "true" values evaluates to 1 in C. https://pubs.opengroup.org/onlinepubs/00969.../stdbool.h.html

This post has been edited by angch: Oct 27 2022, 12:01 AM
FlierMate11
post Oct 27 2022, 12:09 AM

New Member
*
Validating
17 posts

Joined: Oct 2022
QUOTE(angch @ Oct 26 2022, 11:54 PM)
Not too hard. 6. Did it without cheating, and it's been years since I touched C. z++ is a eval then increment. Confirmed via testing it.

Modern compilers just warn that you that "Value stored to 'a' during its initialization is never read"

The other one is "11", because "true" values evaluates to 1 in C. pubs.opengroup.org/onlinepubs/00969.../stdbool.h.html
*
Congratulations! You're absolutely correct. It is good that you dry run it first before testing it in IDE. thumbsup.gif
otai_g
post Oct 28 2022, 10:12 AM

On my way
****
Junior Member
623 posts

Joined: Sep 2008


for me C is fall to another league.
C its not language for IT people, it language for electronic engineer.

u need to understand register, cpu architecture, byte and bits if want to deal with C.

and 1 more things, salary for C programmer its not cheap smile.gif
junyian
post Oct 28 2022, 09:00 PM

Casual
***
Junior Member
401 posts

Joined: Jan 2003


QUOTE(FlierMate11 @ Oct 27 2022, 12:09 AM)
Congratulations! You're absolutely correct. It is good that you dry run it first before testing it in IDE.  thumbsup.gif
*
Try this:
https://www.acepace.net/integerQuiz/

I didn't even get half correct. tongue.gif
khew
post Nov 16 2022, 09:22 PM

New Member
*
Junior Member
24 posts

Joined: Feb 2013


Many legacy systems were written in C and C++. It's not an easy language to pick up for sure unlike some of the newer languages. But if you need high performance and low latecy software, it's the only way to go (imo). For instance, if you want to optimise your product and want a lower level of control say want to experiment with the different types of locks, atomics instead of locks, own memory allocator, then C/C++ is the way to go.
xboxrockers
post Nov 21 2022, 09:01 PM

On my way
****
Senior Member
664 posts

Joined: Dec 2011


Still relevant for embedded system programming, drivers, start up code
TruboXL
post Nov 21 2022, 09:11 PM

Keep on keeping on! 👍
******
Senior Member
1,050 posts

Joined: Jan 2016
From: Land of floods, Kota Tinggi


Now C / C++ can be used to compiled to WebAssembly through the use of Emscripten compiler / emsdk

Old or maybe ancient code can be ported to run on Web Browsers, so C has very longevity left and can stay relevant for a long time

 

Change to:
| Lo-Fi Version
0.0290sec    0.93    5 queries    GZIP Disabled
Time is now: 25th December 2025 - 12:19 AM