Special Char ටිකක් අදුරගමු-
ඔයාල විවිධ වචන ටයිප් කරනකොට ඒ වගේම ජේද වවන සෙට් ටයිප් කරනකොට මෙන්න මේ මම පහලින් දාන Special Char ටික හරි වැදගත් වෙනව-
\n - new line ( සී වලදි මේක නම් ගොඩක් ඕන වෙනව)
\b - backspace
\t - tab
\a - System bell
\\ - print \
\" - print "
\' - print '
මේ උදාහරණ ටික බලන්නකෝ - මේවගෙන් ඔයාට සිරාවටම මේ ස්පෙශල් චා ටික චා කරගන් නැතිව ගොඩ දා ගන්න පුලුවන්-
"\n"
#include<stdio.h>
int main(){
printf("Hello\nC !\n");
return 0;
}
/////////////////////////////////////////////////////////////
"\t"
#include<stdio.h>
int main(){
printf("Hello\tC !\n");
return 0;
}
//////////////////////////////////////////////////////////////
"\b"
#include<stdio.h>
int main(){
printf("Sinhalen\bC !\n");
return 0;
}
///////////////////////////////////////////////////////////////
"\" "
#include<stdio.h>
int main(){
printf("Sinhalen\"C !\n");
return 0;
}
///////////////////////////////////////////////////////////////////
Example
#include<stdio.h>
int main(){
printf("\"Correct\" way to learn C \nfrom Sinhalen C\t\\'C\'\n");
return 0;
}
කිව්වත් වගේ \n තමයි වැඩිපුරම ඕන වෙන්නෙ
මීළග පාඩම තවත් රසවත්--------------------------------------------
මේවයේ අවුල් තියෙන තැන් කියන්න හොදේ----------
https://www.facebook.com/groups/442878449103697/ඔබගේ සී ගැටලුවලට ක්ෂණික විසදුම් සදහා
Powered By Spectra(pvt) ltd
Established in 2012


0 comments:
Post a Comment