Skip to main content

Posts

Showing posts from October, 2019

Recent Posts

Web Technology

Some Important C program using Pointer.

Pointer is a derived datatype in C and pointer variable is a special variable that holds the memory address or location of another variable(i.e. it point to another variable). Referencing a value through a pointer is called indirection or dereferencing . Declaration of pointer variable:-    A pointer variable is declared with an (*) operator before the variable name and is known as pointer or indirection or dereference operator. Syntax:-   data-type *pointer_variable_name;  e.g:-       int *ptr; Initialization:-     Every pointer variable contain garbage value before assignment of some valid address. So, pointer variable must be assigned with '0' or some valid address. void main ()  {   int a=10;   int *ptr;   ptr= &a;   printf(" a= %d ",a);   printf(" a=%d ",*ptr);  } Output:-   a=10   a=10    Below are some important C program using pointer:- > Call by Value and Call by reference >  C program to input 'n'

Macros in C

The #define directive is specially used to define a micro i.e. single identifier that are equivalent to expression , complete statement or group of statements.       It is a fragment of code which has been given a name . Whenever the name is used , it is replaced by the contents of the macro. Syntax:-       #define macroname microexpansion Example:-  #define PI  3.14 #define ADD(a,b) (a+b) Predefined Macros in C Language Predefined                   Value     Macro __DATE__                  String containing the                                        current date __FILE__                   String containing the file name __LINE__                   Integer representing the                                       current line number __STDC__                 If follows ANSI standard                                         C,then value is a                                         non zero integer __TIME__                  String containing the                

Some Important C program using Recursive Function

The function that calling itself repeatedly until some specified condition is called Recursive function. For recursive function , following two conditions must be satisfied. i) The problem must be defined or written in terms of precious result. ii) There must be stopping condition. Below are the some important C program using recursive function:- >  C program to find factorial of a number using recursive function. >  C program to find the sum of 'n' natural number using recurrence function. >  C program to find the sum of digits of a number using recursive function. >  C program to generate fibonacci series upto nth term using recursive function. >  C program to solve tower of hanoi problem using recursion. Some other important c program:- Important C program of 1D Array Important C program of Matrix(2D Array) Important C program of string Important C program using Function Click  Here  to download complete notes of C programming.

Storage Class in C

Storage class is a concept In C which provides information about the variable's visibility ,lifetime and scope. Storage class tells about the following things of variable. i) Scope of variable ii) Initial value of variable iii) Storage location of variable iv) Life span of variable Types of storage class:- i) Automatic variables ii) External variables iii) Static variable iv)  Register variable Different types of storage class are explained in the table given below:- Properties / Types Auto Register Extern Static storage Memory CPU register Memory Memory Default initial value Garbage value Garbage Value 0(zero) 0(zero) scope Only within the block it is defined  Only to the block it is defined Within whole program Only within the block it is defined Life Till control remains within block in which variable is defined Same as auto As long as program executes Persist between different function call  

Some Important Program using function.

A group of statements that perform a specific task and is given a particular name is known as function . A function may or may not return a value. Advantages of using Function:- . Program size is reduced. . Support modular programming(i.e it divides the task). . easy to debugging  . easy for programming Syntax:- return-type function-name(datatype var1 , datatype var2, .......); Below are the some important c program using function:- >  C Program to find area of circle using function. >  C Program to calculate Simple Interest by using function with return type. >  C program to calculate factorial of given number using function.   > C program to calculate the sum of 'n' natural number using function. >  C program to find the sum of digits of a number using function. >  C program to find the maximum of two number using function. >  C program to find the maximum of three number using function. >  C program to revers

Some Important C program of String.

String is an array of character terminated by null character ('\0') and is stored in consecutive memory location.  Each character in string occupies one byte of memory. Declaration of String char variable-name[size]; here, size refers to number of character to be stored. Below are the some important c program of string:- >  Some Important Alphabet pattern program. >  C program to input a sentence and count the number of vowels,consonants and spaces. >  C program to check whether the given string is palindrome or not using string handling function. >  C program to find the length of the given string without using string handling function. >  C program to convert all lowercase letters into uppercase letters and vice versa without using string handling function. >  C program to reverse a string without using string handling function >  C program to copy content of one string to another string without using string handling function. >

Some Important C program of 2D Array (Matrix)

A two dimensional (2D) array is a collection of data items , all of the same types , structured in two dimensions (referred as rows and columns).                  It is also called as array of arrays or matrix. Many times it is required to manipulate the data in table format which contains rows and columns. In these cases, we  have to give two dimensions to the array.    In order to create such two dimensional arrays in C , following syntax should be followed.     data-type array-name[rows][columns]; Below are the some important C Program of 2D Array (Matrix):- > Program to input m * n order matrix  and find its transpose. > Program to input m*n order matrix and find the sum of diagonal element > Program to input m*n matrix and find the sum of right diagonal element. > Program to input m*n order matrix and find the largest element. > Program to input m*n order matrix and find the smallest element. > Program to check two matrix are equal or not. >

Some Important C Program of Array(1D)

An array is a  collection of similar datatypes element under a common name . All the elements of array are stored in consecutive memory location . The array index always started with zero.                    We use array because problem with basic variable i.e a normal variable can hold  only one value at a time . so,to solve this problem array is used (i.e. to store number of same type values to a common name Below are the some important program of array :- > C program to input 'n' number in an array and display it reverse > C program to input "n' number of element in array and find sum of all elements . > C program to input "n' numbers in an array and find highest one. > C program to input "n' numbers in an array and find Smallest one . > Program to input 'n' numbers in array and find the sum of all even number and odd  number separately and also count their number > Program to input 'n' number in arr

Problem solving Technique(PST) Solution - First semester-BE-IT-Pokhara University

Problem Solving Technique(PST) is considered as one of the complex subject of First semester of BE-IT. Most of the student feel difficult to learn and understand this subject. Because there is not only one way or particular way to solve problem . we can solve problem in different way which should be logically and mathematically valid. The best tips is practice daily , try to solve new question so that it helps you to  build logic and you can easily pass this subject . Here i came with the complete solution of Problem solving techniques book which help you to make leaning easy.   TABLE OF CONTENTS CHAPTER   PAGE Basic Concept 17 A Deeper Look at Geometry 26 Problems Involving Counting 52 Problems of Logic 88 Recreational Math 122 Algebra and Analysis 136 A Miscellany 169 Real Life 179 Note:-First try to solve question yourself!! Click Here to download Notes , Solution and study materials of problem Solving Techniques

Engineering Mathematics I -solution-First semester-BE-IT/Computer Engineering-Pokhara University

This is the solution of frequently asked question of Engineering Mathematics I of first semester Be-IT/Computer Engineering . It is based on the syllabus of Engineering mathematics I of Pokhara University. It  contain both Question and its solution. Question is solved in easy way. It contain the solution of following chapter of Engineering Mathematics I:- -Limit Continuity and Derivatives -Higher Order Derivatives -Indeterminant Forms -Mean Value Theorem -Asymptotes -Plane -Vector Geometry Click Here to freely download remaining chapter solution and study materials of Engineering Mathematics I of BE-IT/Computer Engineering of Pokhara University.

Mathematical Foundation of Computer Science(MFCS)- Complete Handwritten Note- Second Sem (BE-IT)-Pokhara University

This is the complete handwritten note of Mathematical foundation of Computer science (MFCS) which teaches in second semester of BE-IT.This note is based on the syllabus of BE-IT of Pokhara University. Notes Contain following Topics:- -Proof and Induction -Introduction to Mathematical Reasoning -Recurrence Relation -Graph Theory -Finite State Automata -Grammer Click Here to freely download all notes and study material related to MFCS