Thread: C Programming

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2019
    Location
    Delhi
    Posts
    1
    Rep Power
    0

    C Programming


    Hello All, I am totally confused about C programming where i can start to learn it. I have seen so many online resources to learn it but still, I am confused. I want to free resource to learn it with real time example. Can anyone know that resource?
  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Posts
    5,988
    Rep Power
    510
    I think you should post your programs here to enter an interactive discussion about best practices, great algorithms, and syntax clarity. Here's a sample program that computes Cardono Triplets.
    Code:
    // a=./pe.251 && make $a && $a > /tmp/a
    
    #include<stdio.h>
    #include<stdlib.h>
    
    #define N 110000/*000*/
    
    //BMAX = ((1 + a)*Sqrt(-1 + 8*a))/(3.*Sqrt(3))
    
    int main() {
      long long a, b, c, ap1, n, d, t, s;
      for (a = 2; a < N; a += 3) {
        ap1 = (a + 1) / 3, t = ap1 * ap1, s = 8 * a - 1, n = t * s;
        for (b = N - a; 0 < --b; ) {
          d = 3 * b * b, c = n / d;
          if ((! (n % d)) && ((0 < c) && ((a + b + c) <= N)))
    	printf("%18lld%18lld%18lld\n", a, b, c);
        }
      }
      return 0;
    }

    Comments on this post

    • Fillmoz525 agrees
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2019
    Posts
    3
    Rep Power
    0
    Free resources itself does have limitation so you can't able to learn it in one place or resources.
    So start with youtube videos simultaneously learn 5-10 functions a day with any free resources.
    And also check the conversation happening in this forum (#C programming).

IMN logo majestic logo threadwatch logo seochat tools logo