Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

    C Programming මුල සිට ඉගෙනගනිමු (part 14 - Strings)

    Blogs
    c programming
    3
    3
    435
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Kalana
      Kalana last edited by

      සුබ දවසක් වේවා ඔයාලට. අද මන් මේ ලිපිය මඟින් කතා කිරීමට බලාපොරොත්තු වන්නේ C Programming වල එන Strings ගැනයි. මොනාද මේ Strings කියලා කියන්නේ. සරලව පැහැදිලි කලොත් String එකක් කියලා කියන්නේ characters කිහිපයක් එකතු වී සෑදුණු array එකක් කියලා කිව්වොත් නිවැරදියි. අපි characters(char) පාවිච්චි කරද්දි අපිට එක්වරකට output කරන්න පුලුවන් එක character එකක් විතරයි, හැබැයි Strings වලදී අපිට ඕන තරම් characters එකවර output කරන්න පුලුවන්. අපි මෙහිදී සාකච්ජා කිරීමට බලාපොරොත්තු වන්නේ Strings යොදා ගනිමින් කරන්න පුලුවන් වැඩ, දිගු කාර්යයන් කෙටියෙන් කරගන්න වගේ දේවල් ගැන.

      මන් මගේ පලවෙනි ලිපියේ කිව්වා prinf(), scanf() වගේ දේවල් store වෙලා තියෙන්නේ #include <stdio.h> යන header file එක ඇතුලේ කියලා. එතකොට Strings වලටත් අපි වෙනම header file එකක් භාවිතා කරනවා. ඒ තමයි #include <string.h> කියන header file එක.

      Array එකක් භාවිතා කර String එකක් ලිවිය හැකි ආකාර දෙකක් පවතිනවා.

      1. char name[]={'K', 'A', 'L', 'A', 'N', 'A', \0'} -: \0 යොදාගන්නේ String එක එම ලකුණින් අවසන් වන බව පෙන්වීමටයි. මෙය NULL character ලෙස හදුන්වයි.

      2. char name[]="KALANA"; -: මෙහිදී \0 ලකුණ යොදන්නේ නැත්තේ එය automatically වචනය අවසානයේ add වන නිසාවෙනි.

      අපි දැන් මේ සාකච්ජා කල කරුණු භාවිතා කර සරල C Program එකක් ලියමු.

      #include <stdio.h>
      #include <string.h> // string header එක භාවිතා කල යුතු වේ.
      
      int main()
      {
          char name[20];
      
          printf("Enter your Name = ");
          scanf("%s", name); // අනික් ඒවා මෙන් නොව මෙහිදී & ලකුණ යෙදිය යුතු නොවේ.
      
          printf("Your name is = %s",name); //string එකක් input කිරීමට හා output කිරීමට %s යොදා ගනී
      
          return 0;
      }
      

      Output -:

      Enter your Name = Kalana
      Your name is = Kalana
      

      මම මගේ 4වෙනි ලිපියෙන් කතා කලා gets() හා puts() ගැන. අපි ඒවා යොදා ගනිමින් ඉහත Program එක නැවත ලියමු.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
        
          char nickname[20];
      
          puts("Enter your Name = ");
          gets(nickname);
      
      	puts("Your name is = ");
          puts(nickname);
      
          return 0;
      }
      

      Output -:

      Enter your Name = 
      Kalana
      Your name is = 
      Kalana
      

      ඉහත උදාහරණ වලින් ඔබට පෙනෙනවා ඇති Strings වල ක්‍රියාකාරිත්වය. අපි දැන් කතා කරමු Strings වල එන functions මොනාද කියලා.

      • strlen -: string එකක දිග සංඛ්‍යාත්මකව ගැනීම මෙමගින් සිදු කරයි.
      • strlwr -: string එකක තියෙන සියලුම අකුරු simple letters එනම් lowercase වලට හැරවීම සිදු කරයි
      • strupr -: string එකක තියෙන සියලුම අකුරු capital letters එනම් uppercase වලට හැරවීම සිදු කරයි
      • strcat -: string දෙකක් වෙන වෙනම ඇති අවස්තාවකදී එක් string එකක් තව string එකකට බද්ද කිරීම සිදු කරයි.
      • strncat -: string දෙකක් වෙන වෙනම ඇති අවස්තාවකදී එක් string එකක් තව string එකකට බද්ද කිරීමෙන් අනතුරුව අවසාන කොටසින් අපට කැමති අකුරු ගණනක් තබාගෙන ඉතුරු අකුරු ඉවත් කිරීම මෙමඟින් සිදු කරයි.
      • strcpy -: string එකක් තව string එකකට copy and paste කිරීම සිදු කරයි.
      • strncpy -: string එකක් තව string එකකට copy and paste කර අපට කැමති අකුරු ප්‍රමාණයක් තබාගෙන ඉතුරු අකුරු ඉවත් කිරීම මෙමඟින් සිදු කරයි.
      • strcmp -: string එකක් තව string එකකට සෑම අතින්ම සමානදැයි පරීක්ෂා කිරීම මෙමඟින් සිදු කරයි.
      • strncmp -: string එකක් තව string එකකට සෑම අතින්ම සමානදැයි string දෙකෙන්ම තෝරාගත් එකලඟ අකුරු කිහිපයක් මඟින් පරීක්ෂා කර බැලීම.
      • strcmpi -: simple හා capital අකුරු නොසලකා හරිමින් string එකක් තව string එකකට සෑම අතින්ම සමානදැයි පරීක්ෂා කිරීම මෙමඟින් සිදු කරයි.
      • stricmp -: මෙහි කාර්යය strcmpi කාර්යයට සමාන වේ.
      • strnicmp -: simple හා capital අකුරු නොසලකා හරිමින් string එකක් තව string එකකට සෑම අතින්ම සමානදැයි string දෙකෙන්ම තෝරාගත් එකලඟ අකුරු කිහිපයක් මඟින් පරීක්ෂා කර බැලීම මෙමඟින් සිදු කරයි.
      • strdup -: string එකක duplicate එකක් හදන එකයි මේකෙන් කරන්නේ.
      • strchr -: අපි අකුරක් දුන්නොත් ඒ අකුර පලමුවට හමුවන ස්තානයේ සිට string එක අවසන් වන ස්තානය දක්වා වචන ටික output වේ.
      • strrchr -: අපි අකුරක් දුන්නොත් ඒ අකුර අවසන් වතාවට හමුවන ස්තානයේ සිට string එක අවසන් වන ස්තානය දක්වා වචන ටික output වේ.
      • strstr -: අපි වචනයක් දුන්නොත් ඒ වචනය පලමුවට හමුවන ස්තානයේ සිට string එක අවසන් වන ස්තානය දක්වා වචන ටික output වේ.
      • strset -: string එකක ඇති අකුරු වෙනුවට අපට කැමති අකුරක් එම string එකේ තිබූ අකුරු ගණනට සමාන ලෙස ආදේශ කිරීම මෙමඟින් සිදු කරයි. passwords වලදී මෙය බොහෝ විට භාවිතා කරයි.
      • strnset -: string එකක මුල් අකුරින් පටන් අරන් අපට කැමති අකුරක් string එකේ තිබූ අකුරු ගණනට සමාන ලෙස ආදේශ කිරීම මෙමඟින් සිදු කරයි
      • strrev -: string එකක් ආපස්සට(reverse) එකට ලිවීම මෙමඟින් සිදු කරයි.

      මේ විදිහට පැහැදිලි කලාට සමහර දේවල් ඔයාලට පැහැදිලි මදියි. ඒ හින්දා දැන් මන් ඉහත සඳහන් කරපු functions ගැන එකින් එක අරන් උදාහරණ මඟින් පහදලා දෙන්නම්.


      strlen

      string එකක දිග සංඛ්‍යාත්මකව ගැනීම මෙමගින් සිදු කරයි.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char name[20] = "Kalana";
           
           printf("Length of the string = %d", strlen(name)); // මම ඇතුලත් කරපු නමේ දිග මෙයින් output කරයි. Kalana කියන එකේ අකුරු 6ක් ඇති නිසා එහි දුග 6ක් වේ.
           return 0;
      }
      

      Output -:

      Length of the string = 6
      

      strlwr

      string එකක තියෙන සියලුම අකුරු simple letters එනම් lowercase වලට හැරවීම සිදු කරයි. මතක තියාගන්න මෙම function එක භාවිතා කල හැක්කේ පරණ C version වල පමණි.

      #include<stdio.h> 
      #include<string.h> 
        
      int main() 
      { 
          char name[20] = "Kalana ERANDA"; 
        
          printf("My name is = %s", strlwr(name)); 
        
          return  0; 
      } 
      

      Output -:

      My name is = kalana eranda
      

      strupr

      string එකක තියෙන සියලුම අකුරු capital letters එනම් uppercase වලට හැරවීම සිදු කරයි. මතක තියාගන්න මෙම function එක භාවිතා කල හැක්කේ පරණ C version වල පමණි.

      #include<stdio.h> 
      #include<string.h> 
        
      int main() 
      { 
          char name[20] = "KalanA eranda"; 
        
          printf("My name is = %s", strupr(name)); 
        
          return  0; 
      } 
      

      Output -:

      My name is = KALANA ERANDA
      

      strcat

      string දෙකක් වෙන වෙනම ඇති අවස්තාවකදී එක් string එකක් තව string එකකට බද්ධ කිරීම සිදු කරයි.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word1[10] = "Hello"; //අපගේ පලමු string එක
           char word2[10] = "World"; // අපගේ දෙවන string එක
           
           strcat(word1, word2); //දෙවන string එක පලමුවන string එකට බද්ධ කිරීම
           printf("Output after connecting two strings =  %s", word1); //බද්ධ කිරීමෙන් අනතුරුව පලමු string එකේ නවතම අගය.
           
           return 0;
      }
      

      Output -:

      Output after connecting two strings = HelloWorld
      

      strncat

      string දෙකක් වෙන වෙනම ඇති අවස්තාවකදී එක් string එකක් තව string එකකට බද්ද කිරීමෙන් අනතුරුව අවසාන කොටසින් අපට කැමති අකුරු ගණනක් තබාගෙන ඉතුරු අකුරු ඉවත් කිරීම මෙමඟින් සිදු කරයි.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word1[10] = "Hello";
           char word2[10] = "World";
           
           strncat(word1, word2, 3); //මෙහි 3න මඟින් කියැවෙන්නේ string දෙක බද්ධ වූ පසු දෙවෙනියට බද්ධ කල වචනයෙන් පලමු අකුරු තුන තියාගෙන ඉතුරු අකුරු ටික අයින් කරලා දාන ලෙසයි.
           printf("Output after connecting two strings =  %s", word1);
           
           return 0;
      }
      

      Output -:

      Output after connecting two strings = HelloWor  //3 යෙදූ නිසා World වලින් පලමු අකුරු තුන පමණක් output වේ.
      

      strcpy

      string එකක් තව string එකකට copy and paste කිරීම සිදු කරයි.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word1[30] = "Hello";
           char word2[30] = "My name is kalana";
      
           strcpy(word1, word2); // word2 වල ඇති මුලු අගය word1 වලට copy කරයි. එවිට word1 හි නවතම අගය වන්නේ "Hello" නොව "My name is kalana" යන්නයි.
           printf("After copying, word1's value is =  %s", word1);
           
           return 0;
      }
      

      Output -:

      After copying, word1's value is =  My name is kalana
      

      strncpy

      string එකක් තව string එකකට copy and paste කර අපට කැමති අකුරු ප්‍රමාණයක් තබාගෙන ඉතුරු අකුරු ඉවත් කිරීම මෙමඟින් සිදු කරයි.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word1[30] = "Hello";
           char word2[30] = "My name is kalana";
      
           strncpy(word1, word2, 7); // word2 වල ඇති පලමු අගයන් 7 පමණක් word1 වලට copy කිරීම සිදු කරයි. එවිට word1 හි නවතම අගය වන්නේ "Hello" නොව "My name" යන්නයි.
           printf("After copying, word1's value is =  %s", word1);
           
           return 0;
      }
      

      Output -:

      After copying, word1's value is =  My name
      

      strcmp

      string එකක් තව string එකකට සෑම අතින්ම සමානදැයි පරීක්ෂා කිරීම මෙමඟින් සිදු කරයි.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word1[20] = "google";
           char word2[20] = "google.com";
           
           if (strcmp(word1, word2) == 0) //word1 හා word2 වල අගයන් එකිනෙකට සමාන කර බලා එය 0ට සමානනම් එම අගයන් දෙක එකිනෙකට සමාන වේ.
           {
              printf("word1 and word2 are equal");
           }
           else //එසේ නොමැතිනම් word1 හා word2 වල අගයන් එකිනෙකට සමාන කර බලා එය 1ට සමානනම්  එම අගයන් දෙක එකිනෙකට අසමාන වේ.
           {
              printf("word1 and word2 are different");
           }
           
           return 0;
      }
      

      Output -:

      word1 and word2 are different
      
      • second run
      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word1[20] = "google";
           char word2[20] = "google";
           
           if (strcmp(word1, word2) == 0) //word1 හා word2 වල අගයන් එකිනෙකට සමාන කර බලා එය 0ට සමානනම් එම අගයන් දෙක එකිනෙකට සමාන වේ.
           {
              printf("word1 and word2 are equal");
           }
           else //එසේ නොමැතිනම් word1 හා word2 වල අගයන් එකිනෙකට සමාන කර බලා එය 1ට සමානනම්  එම අගයන් දෙක එකිනෙකට අසමාන වේ.
           {
              printf("word1 and word2 are different");
           }
           
           return 0;
      }
      

      Output -:

      word1 and word2 are equal
      

      strncmp

      string එකක් තව string එකකට සෑම අතින්ම සමානදැයි string දෙකෙන්ම තෝරාගත් එකලඟ අකුරු කිහිපයක් මඟින් පරීක්ෂා කර බැලීම.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word1[20] = "google";
           char word2[20] = "google.com";
           
           if (strncmp(word1, word2, 6) == 0) //word2 වල එන පලමු අකුරු 6 පමණක් word1 වල අගයට සමාන කරයි. 6 මඟින් සිදු කරන්නේ එම කාර්යයයි.
           {
              printf("word1 and word2 are equal");
           }
           else
           {
              printf("word1 and word2 are different");
           }
           
           return 0;
      }
      

      Output -:

      word1 and word2 are equal
      
      • second run
      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word1[20] = "google";
           char word2[20] = "google.com";
           
           if (strncmp(word1, word2, 8) == 0) //word2 වල එන පලමු අකුරු 6 පමණක් word1 වල අගයට සමාන කරයි. 6 මඟින් සිදු කරන්නේ එම කාර්යයයි.
           {
              printf("word1 and word2 are equal");
           }
           else
           {
              printf("word1 and word2 are different");
           }
           
           return 0;
      }
      

      Output -:

      word1 and word2 are different
      

      strcmpi හා stricmp

      simple හා capital අකුරු නොසලකා හරිමින් string එකක් තව string එකකට සෑම අතින්ම සමානදැයි පරීක්ෂා කිරීම මෙමඟින් සිදු කරයි. මතක තියාගන්න මෙම function එක භාවිතා කල හැක්කේ පරණ C version වල පමණි.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word1[20] = "google";
           char word2[20] = "GOOGLE";
           
           if (strcmpi(word1, word2) == 0)
           {
              printf("word1 and word2 are equal"); //simple හා capital අකුරු නොසලකා හරිමින් word1, word2 වලට සමානදැයි පරීක්ෂා කර බලයි. 
           }
           else
           {
              printf("word1 and word2 are different");
           }
           
           return 0;
      }
      

      Output -:

      word1 and word2 are equal
      

      strnicmp

      simple හා capital අකුරු නොසලකා හරිමින් string එකක් තව string එකකට සෑම අතින්ම සමානදැයි string දෙකෙන්ම තෝරාගත් එකලඟ අකුරු කිහිපයක් මඟින් පරීක්ෂා කර බැලීම මෙමඟින් සිදු කරයි.
      මතක තියාගන්න මෙම function එක භාවිතා කල හැක්කේ පරණ C version වල පමණි.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word1[20] = "google";
           char word2[20] = "GooGLe.COM";
           
           if (strnicmp(word1, word2, 6) == 0) //පලමු අකුරු 6 පමණක් සසඳා බලයි
           {
              printf("word1 and word2 are equal");
           }
           else
           {
              printf("word1 and word2 are different");
           }
           
           return 0;
      }
      

      Output -:

      word1 and word2 are equal
      

      strdup

      string එකක duplicate එකක් හදන එකයි මේකෙන් කරන්නේ. මෙය අනිත් ඒවා මෙන් නොව මුල් variable එකට හානියක් නොකරයි.

      #include<stdio.h> 
      #include<string.h> 
        
      int main() 
      { 
          char name[] = "Kalana Eranda"; //ප්‍රධාන variable එක
        
          char *duplicate = strdup(name);  // ප්‍රධාන variable යොදා ගනිමින් සෑදූ එහි duplicate variable එක.
        
          printf("name is = %s", name); //ප්‍රධාන variable එක output කිරීම.
          printf("\nduplicate of name is = %s", duplicate); //duplicate variable එක output කිරීම.
          
          return 0; 
      } 
      

      Output -:

      name is = Kalana Eranda
      duplicate of name is = Kalana Eranda
      

      strchr

      අපි අකුරක් දුන්නොත් ඒ අකුර පලමුවට හමුවන ස්තානයේ සිට string එක අවසන් වන ස්තානය දක්වා වචන ටික output වේ.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word[50] = "I am an example of function strchr from strings";
           
           printf ("%s", strchr(word, 'f')); //අපිට මෙහි පලවෙනියටම හමුවන f අකුර පවතින්නේ of තුලයි. එබැවින් එම f අකුරේ සිට word එක අවසානය දක්වා සියලු වචන output වේ.
           return 0;
      }
      

      Output -:

      f function strchr from strings
      

      strchr

      අපි අකුරක් දුන්නොත් ඒ අකුර අවසන් වතාවට හමුවන ස්තානයේ සිට string එක අවසන් වන ස්තානය දක්වා වචන ටික output වේ.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word[50] = "I am an example of function strchr from strings";
           
           printf ("%s", strrchr(word, 'f')); //මෙහිදී අපට අවසානයටම f අකුරක් ලැබෙන ස්තනය වන්නේ from කියන තැන f අකුරයි. එම f අකුර පටන් ගන්නා ස්තානයේ සිට word එක අවසානය දක්වා සියලු වචන output වේ.
           return 0;
      }
      

      Output -:

      from strings
      

      strstr

      අපි වචනයක් දුන්නොත් ඒ වචනය පලමුවට හමුවන ස්තානයේ සිට string එක අවසන් වන ස්තානය දක්වා වචන ටික output වේ.

      #include <stdio.h>
      #include <string.h>
      
      int main()
      {
           char word[50] = "I am an example of function strchr from strings";
           
           printf ("%s", strstr(word, "ampl")); //ampl කියන කොටස ඇත්තේ example කියන වචනය තුලයි. එබැවින් ampl කියන කොටසේ සිට word එක අවසානය දක්වා සියලු වචන output වේ.
           return 0;
      }
      

      Output -:

      ample of function strchr from strings
      

      strset

      string එකක ඇති අකුරු වෙනුවට අපට කැමති අකුරක් එම string එකේ තිබූ අකුරු ගණනට සමාන ලෙස ආදේශ කිරීම මෙමඟින් සිදු කරයි. passwords වලදී මෙය බොහෝ විට භාවිතා කරයි. මතක තියාගන්න මෙම function එක භාවිතා කල හැක්කේ පරණ C version වල පමණි.

      #include<stdio.h>
      #include<string.h>
      
      int main()
      {
        char password[20] = "kalana";
         
        printf("Original string is = %s", password); //අපගේ Original වචනය මෙමගින් output කෙරේ.
         
        printf("After using strset() = %s", strset(password,'*')); // kalana වල එන අකුරු 6වෙනුවට එම අකුරු 6ට '*' ලකුන ආදේශ කර නවතම තරු අගය output කෙරේ.
        return 0;
      }
      

      Output -:

      Original string is = kalana
      After using strset() = ******
      

      strnset

      string එකක මුල් අකුරින් පටන් අරන් අපට කැමති අකුරක් string එකේ තිබූ අකුරු ගණනට සමාන ලෙස ආදේශ කිරීම මෙමඟින් සිදු කරයි. මතක තියාගන්න මෙම function එක භාවිතා කල හැක්කේ පරණ C version වල පමණි.

      #include<stdio.h>
      #include<string.h>
      
      int main()
      {
        char password[20] = "kalana";
         
        printf("Original string is = %s", password); //අපගේ Original වචනය මෙමගින් output කෙරේ.
         
        printf("After using strset() = %s", strset(password,'*', 3)); // kalana වල එන පලමු අකුරු 3 වන kal වෙනුවට එම අකුරු 3ට '*' ලකුන ආදේශ කර නවතම තරු අගය output කෙරේ.
        return 0;
      }
      

      Output -:

      Original string is = kalana
      After using strset() = ***ana
      

      strrev

      string එකක් ආපස්සට(reverse) එකට ලිවීම මෙමඟින් සිදු කරයි. මතක තියාගන්න මෙම function එක භාවිතා කල හැක්කේ පරණ C version වල පමණි.

      #include<stdio.h> 
      #include<string.h> 
        
      int main() 
      { 
         char name[50] = "kalana"; 
        
         printf("Original name is = %s\n", name); 
         printf("After reversing, new name is = %s", strrev(name)); //අපි ඇතුලත් කල වචනය කණපිට හැරවීම සිදු කරයි.
        
         return 0; 
      } 
      

      Output -:

      Original name is = = kalana
      After reversing, new name is = analak
      

      • C programm එකක් windows වල run කරන විදිහ --> https://bit.ly/2O6rLXR

      ඔබට අවශ්‍යනම් ඔබේ බ්‍රව්සර් එක හරහා online C programms run කරන්න පුලුවන්. එහෙම කරන්න පුලුවන් ලින්ක්ස් මන් පහතින් දාන්නම්

      • https://www.onlinegdb.com/online_c_compiler
      • https://www.tutorialspoint.com/compile_c_online.php
      • https://repl.it/languages/c

      සරලව මුල ඉදන් C programming ඉගෙන ගන්න පුලුවන් හොදම site කිහිපයක් මන් දාන්නම්

      • https://www.geeksforgeeks.org/c-programming-language/
      • https://www.tutorialspoint.com/cprogramming/index.htm
      • https://beginnersbook.com/2014/01/c-tutorial-for-beginners-with-examples/

      web url කෙටි කරන්න lankadevelopers ලා හදපු එයාලගෙම සයිට් එකක් තියෙනවා. -> https://link.lankadevelopers.com/

      මගේ කලින් ලිපි

      • C Programming මුල සිට ඉගෙනගනිමු(part 1 - Introduction) -: https://link.lankadevelopers.com/4WpH
      • C Programming මුල සිට ඉගෙනගනිමු (part 2 - Variables) -: https://link.lankadevelopers.com/mXio
      • C Programming මුල සිට ඉගෙනගනිමු (part 3 - Operators) -: https://link.lankadevelopers.com/SHNt
      • C Programming මුල සිට ඉගෙනගනිමු (part 4 - Input & Output functions) -: https://link.lankadevelopers.com/2MNku
      • C Programming මුල සිට ඉගෙනගනිමු (part 5 - create simple applications) -: https://link.lankadevelopers.com/KUF6
      • C Programming මුල සිට ඉගෙනගනිමු (part 6 - Decision making(if-else statement - part 1)) -: https://link.lankadevelopers.com/8Xe71
      • C Programming මුල සිට ඉගෙනගනිමු (part 7 - Format Specifiers in C) -: https://link.lankadevelopers.com/761PT
      • C Programming මුල සිට ඉගෙනගනිමු (part 8 - Switch Statement) -: https://link.lankadevelopers.com/7jncK
      • C Programming මුල සිට ඉගෙනගනිමු (part 9 - While loop) -: https://link.lankadevelopers.com/4TBV5
      • C Programming මුල සිට ඉගෙනගනිමු (part 10 - do-while loop) -: https://link.lankadevelopers.com/4WcNd
      • C Programming මුල සිට ඉගෙනගනිමු (part 11 - for loop) -: https://link.lankadevelopers.com/8utoa
      • C Programming මුල සිට ඉගෙනගනිමු (part 12 - arrays) -: https://link.lankadevelopers.com/46cyf
      • C Programming මුල සිට ඉගෙනගනිමු (part 13 - 2D-arrays) -: https://link.lankadevelopers.com/4Q9Gt

      මේ ලිපියෙන් Strings වල එන මූලික කරුණු සියල්ලක්ම පාහේ අපි සාකච්ජා කලා. මන් ඊලග ලිපියෙන් Strings යොදාගෙන ගැටලු විසඳන හැටි ඔයාලට කියලා දෙන්නම්. මගේ ලිපි වල අඩුපාඩු තියෙනවනම් දන්නේ නැති දේවල් තියෙනවනම් පහලින් කමෙන්ට් එකක් දාන්න.
      තව ලිපියකින් හම්බෙමු ජය වේවා.

      1 Reply Last reply Reply Quote 4
      • root
        root Linux Help last edited by

        supiri bro, meka godak wadagath aluthen igana ganna ayata, mama balannam me tutorial set ekata fb eke promotion ekka gahanna kattiyath ekka katha karala.

        1 Reply Last reply Reply Quote 1
        • 4
          40D3R last edited by 40D3R

          digatama karanna, all da best,

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post

          0
          Online

          3.7k
          Users

          1.3k
          Topics

          5.3k
          Posts

          • Privacy
          • Terms & Conditions
          • Donate

          © Copyrights and All right reserved Lanka Developers Community

          Powered by Axis Technologies (PVT) Ltd

          Made with in Sri Lanka

          | |