icon Teks Tertulis
Memuat subtitle...

Learn C programming variables easy! ❎

youtube terjemahan youtube penerjemah youtube transkrip youtube subtitle terjemahkan youtube ke indonesia youtube terjemahan video youtube translate to indonesian translate youtube to indonesian youtube transcript to indonesian translate youtube video to indonesian

YouTube transcript, YouTube translate

32/32

A quick preview of the first subtitles so you know what the video covers.

all right everybody in this video I'm going to explain variables in the C programming language you're probably used to variables back in middle school a variable represents some value well in programming we have something similar a variable is a reusable container for a value the variable behaves as if it were the value it contains but we do have the capability of storing more than just numbers there's different data types let's begin with the data type of int meaning integer to create an integer variable we will say int meaning integer then we need a unique name for this variable let's say we're working with ages let's say int age we'll assign this variable of value using equals so let's say that I'm 25 in the C programming language we have to end each statement with a semicolon so we can use this variable age and it will behave as if it was the number 25 to display this variable we can use that within a print statement so print F in the C programming language to display a variable we'll have to use a format let's say we have a string of text such as you are our variable age years old to insert a variable I'm going to use a percent sign for a format specifier to display an INT and int eger we'll use D meaning decimal years old following the string of text I will add a comma then the variable I would like to insert my variable age let's give it a test test run you are my variable age which is 25 years old so an INT is a whole number a whole integer if I were to say 25.5 you know like it's my half birthday well we end up truncating that decimal portion because integers can't store decimals use an integer let's create another variable repetition is going to to help us remember these steps another example of an integer could be a year int year what year is it I will say 2025 then I'll create another print F statement print F let's say the year is wherever I would like to insert a variable I will use a format specifier that percent sign then use D for decimal comma then my variable of year the year is oh and then let's be sure to add a new line character cuz I forgot to add that new line new line that's better you are 25 years old the year is 2025

Pengaturan

100%

Bahasa target terjemahan

🔊 Pemutaran audio
Memutar audio terjemahan