Designated Initializers For Arrays | C Programming Tutorial

  Рет қаралды 2,025

Portfolio Courses

Portfolio Courses

Күн бұрын

Пікірлер: 16
@massimorusso3894
@massimorusso3894 Жыл бұрын
Grazie Professore non conoscevo l'inizializzazione degli array in questo modo. Video fantastico e fatto in modo semplice. Un saluto
@PortfolioCourses
@PortfolioCourses Жыл бұрын
You're welcome Massimo! :-)
@yogeshchauhan9401
@yogeshchauhan9401 Жыл бұрын
Very precise video 👍
@PortfolioCourses
@PortfolioCourses Жыл бұрын
I’m glad you enjoyed it Yogesh! :-)
@carmelostagno6352
@carmelostagno6352 Жыл бұрын
Thanks for your job. I learned very much from your videos and I hope you will continue in the future!
@PortfolioCourses
@PortfolioCourses Жыл бұрын
You're welcome Carmelo, I'm glad you're enjoying the videos! :-)
@FritsvanDoorn
@FritsvanDoorn Жыл бұрын
One question. Although the optimizer might optimize it, ++i is faster than i++. So isn't it better to use ++i to indicate that you have thought about this? Thank you.
@PortfolioCourses
@PortfolioCourses Жыл бұрын
My understanding is that the whole topic of ++i and i++ and performance is complicated. :-) In addition to compiler optimizations, there is C vs C++, where in C++ the postfix and prefix increment operators can be overloaded for objects. There is also the issue of 'sequence points': en.wikipedia.org/wiki/Sequence_point. This answer here may be interesting, as well as the rest of the answers: stackoverflow.com/a/26482954. For this for loop though, using either i++ or ++i as the update statement will not have a difference in performance.
@FritsvanDoorn
@FritsvanDoorn Жыл бұрын
@@PortfolioCourses I finally did some testing and indeed there is no difference in time. What I did was: an array of size 1000000, in a loop filled the array with its index *2, then in a new loop checked the values. Timed this for ++i and for i++ using clock_gettime() to measure nano seconds. Calculated an average over 100 times measuring. The values are actually nearly the same. Thank you for the extra information in your answer. Very interesting.
@CoderDBF
@CoderDBF Жыл бұрын
@@FritsvanDoornInteresting, thank you for testing this out. The only difference between science and goofing around is taking notes. You are a true scientist.
@fifaham
@fifaham Жыл бұрын
Nice
@PortfolioCourses
@PortfolioCourses Жыл бұрын
I’m glad you liked it Firas! :-)
@mjsaedy6637
@mjsaedy6637 Жыл бұрын
Cool
@PortfolioCourses
@PortfolioCourses Жыл бұрын
I'm glad you enjoyed it! :-)
@MF18-2020
@MF18-2020 Жыл бұрын
while (true) printf("thank you ");
@PortfolioCourses
@PortfolioCourses Жыл бұрын
do { printf("you're welcome"); } while (true);
Flexible Array Members | C Programming Tutorial
13:27
Portfolio Courses
Рет қаралды 2,6 М.
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,2 МЛН
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 8 МЛН
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 11 МЛН
SCHOOLBOY. Мама флексит 🫣👩🏻
00:41
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 6 МЛН
Find The Most Frequent Value In An Array | C Programming Example
9:44
Portfolio Courses
Рет қаралды 11 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 219 М.
String In Char Array VS. Pointer To String Literal | C Programming Tutorial
9:58
struct Basics | C Programming Tutorial
24:44
Portfolio Courses
Рет қаралды 138 М.
What Is Dynamic Programming and How To Use It
14:28
CS Dojo
Рет қаралды 1,5 МЛН
Dynamic Arrays 🌱
24:22
Bro Code
Рет қаралды 89 М.
Dynamically Allocate An Array Of Structs | C Programming Tutorial
15:11
Portfolio Courses
Рет қаралды 34 М.
Should you learn C++?? | Prime Reacts
20:29
ThePrimeTime
Рет қаралды 359 М.
Read CSV File Data Into An Array Of Structs | C Programming Example
11:05
Portfolio Courses
Рет қаралды 42 М.
Array Basics | C Programming Tutorial
13:37
Portfolio Courses
Рет қаралды 37 М.