Showing posts with label C. Show all posts
Showing posts with label C. Show all posts

Friday 21 June 2019

Thursday 20 June 2019

C Program for Addition of Two Numbers

Program for addition of two numbers
 
                    


Output:
       


Code :-


#include <stdio.h>
#include <stdlib.h>

int main()
{
int a,b,c;
printf("Enter a number:\n");
scanf("%d",&a);
printf("Enter another number:\n");
scanf("%d",&b);
c=a+b;
printf("The Sum is : \n=%d ",c);
return 0;
}

Monday 17 June 2019

Lecture 9 - While Loop Example GCD

While Loop Example GCD                                                                                                                                                                                                          
                                                                                                             

Lecture 8 - While Loop Example

While Loop Example                                                                                                                                                                 


Lecture 7 - While Loop 1

While Loop Example                                                                                                                                                              
In this lecture we will learn about introduction to while loop.                                                                                                                                                                                                                                                

Saturday 15 June 2019

Lecture 6 :- Operators in C

Operators in C                                                                                                           
In this lecture we will learn about different types of operators in C.                                                                                                                                                                  


Lecture 5 :- Variables in C

Variables in C                                                                                                                                                                                                                            
In this lecture we will learn about variables in C                                                                                                                   

Lecture 4 Tracing a Simple Program

 Tracing a Simple Program

  In this video we will learn  how to write a basic program in C.How to run a program in C.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 

Lecture 3 :- The Programming Cycle

The Programming Cycle


In this video we will learn about what are the basics steps to run a program in C                                                                                                                                                                                                           

Lecture 2: Introduction to Greatest Common Divisor


In this video you will learn about Euclid's Greatest Common Divisor (Theorem) and its relation with C language.We will also learn some basics step to run a program.                                                                                                                                     


Wednesday 27 March 2019

Beginning C, 5th Edition (Expert's Voice in C) by Ivor Horton (Author)

Beginning C, 5th Edition teaches you how to program using the widely-available C language. You'll begin from first-principles and progress through step-by-step examples to become a competent, C-language programmer. All you need are this book and any of the widely available free or commercial C or C++ compilers, and you'll soon be writing real C programs.
C is a foundational language that every programmer ought to know. C is the basis for C# used in Microsoft .NET programming. It is the basis for Objective-C used in programming for the iPhone, the iPad, and other Apple devices. It is the basis for the C++ that is widely used in a great many contexts, including the GNU Project. It underlies the Linux operating system and many of its utilities. Learning C provides a strong foundation for any programming care, and will even help you better understand more modern languages such as Java.
Beginning C is written by renowned author Ivor Horton. The book increases your programming expertise by guiding you through the development of fully working C applications that use what you've learned in a practical context. You’ll also be able to strike out on your own by trying the exercises included at the end of each chapter. At the end of the book you'll be confident in your skills with all facets of the widely-used and powerful C language.
  • The only beginning-level book to cover the latest ANSI standard in C
  • Revised to cover C99 features newly-supported by language compilers
  • Emphasizes writing code after the first chapter
  • Includes substantial examples relevant to intermediate users 

Buy :
Beginning C, 5th Edition (Expert's Voice in C) Paperback – 13 Mar 2013 by Ivor Horton (Author) 

PDF Download :

Beginning C, 5th Edition (Expert's Voice in C) Paperback – 13 Mar 2013 by Ivor Horton (Author) 




Head First C Paperback – 2012 by Griffiths David (Author)

Ever wished you could learn C from a book? Head First C provides a complete learning experience for C and structured imperative programming. With a unique method that goes beyond syntax and how-to manuals, this guide not only teaches you the language, it helps you understand how to be a great programmer. You will learn key areas such as language basics, pointers and pointer arithmetic and dynamic memory management. Advanced topics include multi-threading and network programming topics typically covered on a college-level course.

This book also features labs: in-depth projects intended to stretch your abilities, test your new skills and build confidence. Head First C mimics the style of college-level C courses, making it ideal as an accessible textbook for students.

We think your time is too valuable to waste struggling with new concepts. Using the latest research in cognitive science and learning theory to craft a multi-sensory learning experience, Head First C uses a visually rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.

Buy :

Head First C Paperback – 2012 by Griffiths David (Author) 

PDF Download :



Tuesday 26 March 2019

C Programming Language 2nd Edition by Brian. W Kernighan (Author)

C Programming Language 2nd Edition is a book that gives you just what you need to know about this powerful programming language. Unlike most of its rivals, which try to pack in irrelevant information as well, this book comes jam-packed with the most accurate and handy information that any lover of this programming language could possibly need. This second edition is inclusive of all the changes that have come about in the language, making the book a powerful resource for its readers.
This book proves itself to be a complete and accurate guide for ANSI standard C programming language. It has been written by the very same developers who developed C, which is beneficial for its readers, as it gives them the edge over other books. The book shows you exactly how you can make the most of the rich set of operators that C has to offer. It also familiarizes you with other concepts that include improved control flow, economy of expression and data structures as well.
The second edition of the book has been rewritten, so as to include many more examples than before. It also comes with problem sets that aim to clarify the doubts that you have, concerning the complicated language constructs of this language and their implementation as well.
C Programming Language 2nd Edition has been published by Pearson Education (Singapore) Pte. Ltd., in the year 2008 and is available in paperback.
Key Features

  • The book is packed with multiple examples and problem sets.
  • The recent edition of the book is inclusive of all the latest changes that have been made to the language.

Buy :

C Programming Language 2nd Edition Paperback – 2008 by Brian. W Kernighan (Author) 

PDF Download :

C Programming Language 2nd Edition Paperback – 2008 by Brian. W Kernighan (Author) 



Monday 9 April 2018

Pointer and Function

The pointers are very much used in a function. Sometimes only with a pointer a complex function can be easily represented and success. The usage of the pointers in a function defintion may be classified into two groups.
1. Call by Value.
2. Call by reference

Call by Value 
  We have seen that a function in invoked there will be a link established between the formal and actual parameters. A temporary storage is created where the value of actual parameters is stored.

The formal parameters picks up its value from storage area the mechanism of data transfer between actual parameters mechanism of data transfer is referred as call by value.

The corresponding formal parameters represents a local variable in the called function.


This will not change the value of actual parameters.

#include<stdio.h>
void main( )
{
int x,y;
x=20;
y=30;
printf("\n Value of a and b before function call = %d%d",a,b);
fucn(x,y);
printf("\n Value of a and b after function call = %d%d",a,b);
}
fucn(p,q)
int p,q;
{
p=p+q;
q=q+q;
}

Call by Reference
 When we pass address to a function the parameters  receiving the address  should be pointers. The process of calling a function by using pointers to pass the address of the variable is known as call by reference . The function which is called by reference can change the value of the variable used in the call.

/* Example of call by reference */

#include<stdio.h>
void main( )

int x, y;
x=20;
y=30;
printf("\n Value of a and b before function call = %d%d",a,b);
fucn(&x,&y);
printf("\n Value of a and b after function call = %d%d", a,b);
}
fucn(p,q)
int p,q;
{
*p=*p + *p;
*q=*q + *q;
}

Function

A function is a self contained block of statement that performs a coherent task of some kind.

Functions provides modularity to the software.

#include<stdio.h>
int add (int x, int y)
int z;
z = x + y;
return (z);
}
main( )
{
int i,j,k;
i = 10;
j = 20;
k = add(i,j)        /* function call */
printf("The value of k is %d\n",k);
}

Output:-
  The value of k is 30.
 

Popular Posts

Categories

AI (27) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (117) C (77) C# (12) C++ (82) Course (62) Coursera (179) coursewra (1) Cybersecurity (22) data management (11) Data Science (95) Data Strucures (6) Deep Learning (9) Django (6) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flutter (1) FPL (17) Google (19) Hadoop (3) HTML&CSS (46) IBM (25) IoT (1) IS (25) Java (92) Leet Code (4) Machine Learning (44) Meta (18) MICHIGAN (5) microsoft (3) Pandas (3) PHP (20) Projects (29) Python (753) Python Coding Challenge (226) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (40) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses