Hi every body i m new to the computer science i dont know how to get started with C my friend advised me to creta account here so i do . i hope that u people will help me to cope up all the facts about C and C ++.

hamza mughal commented: i have done my f.sc. but know i entered in bs software engg . so i m worried about myselff +0

Recommended Answers

All 6 Replies

Have you read the Starting C sticky?

"The C Programming Language" by Kernighan and Ritchie.

Many years ago that is how I got started; after trying a couple of other books which were as clear as mud.

Start with a simple program.

#include <stdio.h>

int main(){
    printf("Hello World!");
    return 0;
}

Then expand on it.

#include <stdio.h>
char name[20]="firdousahmad";
int main(){
    printf("Hello World!\n"); //The backslashed n starts a new line.
    printf("My name is %s.", name); //printf will replace the %s with the "name" variable.
    return 0;
}

Get silly with it.

#include <stdio.h>
    char name[20]="firdousahmad";
    int main(){
    int i;
        printf("Hello World!\n"); //The backslashed n starts a new line.
        printf("My name is %s", name); //printf will replace the %s with the "name" variable.
        for(i=0;i<10;i++){
            printf("!");
        }
        return 0;
    }

Then get even sillier.

#include <stdio.h>
char name[20]="firdousahmad";
int main(){
    int i, x, y;
    printf("Hello World!\n"); //The backslashed n starts a new line.
    printf("My name is %s", name); //printf will replace the %s with the "name" variable.
    for(i=0;i<10;i++){
        printf("!");
    }
    printf("I have a strange obsession with triangles.\n");
    for(x=0;x<10;x++){
        for(y=0;y<=x;y++){
            printf("*");
        }
        printf("\n");
    }
    printf("It's really sort of tragic.\n");
    return 0;
}

Have fun. Learn. Be silly. Enjoy it.
Happy coding.

Read Let us c by yashavant p. kanetkar

Read Let us c by yashavant p. kanetkar

And be aware that it's not a very good book, despite being highly recommended by a large portion of equally not very good C programmers. ;) But you can still learn things from a bad book, so I encourage reading as much as possible.

thanks to every body who has encouraged me

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.