C programming වලදී ඇයි & ලකුණ පාවිච්චි කරන්නේ ඇයි ? ඒ කියන්නේ
scanf(“%d”, &name); මෙතන කෙලින්ම name පාවිච්චි නොකර ඇයි &name කියලා දාන්නේ ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Syntax
Syntax
Syntax
syntax.
Cහි, විචල්යයන් යනු ක්රියාත්මක වන වැඩසටහනක්
භාවිතා කරන පරිගණකයේ මතක ලිපින සඳහා
මිනිසුන්ට කියවිය හැකි නම් වේ.
ඔබේ වැඩසටහනේ දත්ත ගබඩා කරන මතක
ලිපින සඳහා පහසුවෙන් මතක තබා ගත හැකි ලේබල
ඇසුරු කිරීමට ඉඩ දීමෙන් විචල්යයන් මඟින්
පරිගණකයේ මතකය තුළ දත්ත ගබඩා කිරීම,
කියවීම සහ වෙනස් කිරීම පහසු කරයි.
In C, variables are a program that is executed For memory addresses on the computer used Are names that people can read. Memory that stores data in your program Easy-to-remember labels for addresses By allowing variables to associate Storing data in computer memory, Makes it easy to read and edit.
because, (&) is represent address of variable.Every variables are stored in particular memory address. That’s why should use (&).
run this code
———————–
# include
int main(){
int num = 12;
// here (int *) is pointer
int *number = #
printf(“Address: %p”, number);
/*
the star is
representvariable
value
*/
printf(“Value: %d”, *numper);
}
————————-
මන්ද, (&) යනු විචල්යයේ ලිපිනයයි. සෑම විචල්යයක්ම විශේෂිත මතක ලිපිනයේ ගබඩා කර ඇත. (&) භාවිතා කළ යුත්තේ එබැවිනි.
#include
else
switch
struct
short
Syntax
අපි c වලදී variable එකකට value එකක් scanf() පාවිච්චිකරල දානකොට ඒ අදාල variable එකට RAM(main memory) එකේ වෙන්වුන ඉඩ තියෙන තැනට අදාල memory address එකම දෙන්න ඕනෙ. ‘&’ මේ operator එකෙන් කරන්නේ අන්න ඒ අදාල තැනට අපි scanf() එකෙන් ගන්න value එක pass කරන එක.
c language සම්බන්ද ගැටළු තවත් තියෙනවනම් මාව සම්බන්ද කරගන්න.
syntax
ඒක නියතයක්
syntax