Posts

Control Statements in C Programming | C Programming

Image
Control Statement Control statements enable us to specify the flow of program control i.e., the order in which the instructions in a program must be executed. They make it possible to make decisions, perform tasks repeatedly, or jump from one section of code to another. The different forms of if statements with their syntax and semantic diagram are: - If statements: -  The if statement evaluates the test expression inside the parenthesis. If the test expression is evaluated to true (non-zero), statements inside the body it is executed. If the test expression is evaluated to false (0), statements inside the body of if are skipped from execution. The Syntax and Semantics diagram are: if (test expression) {     (statements) } If else statement:  The if-else statement executes some code if the test expression is true (nonzero) and some other code if the expression is false (0). If the tested expression is true, codes inside the body of the if statement is executed and, codes inside the

Array in C Programming | C Programming

Image
Array in C Array in C Programming The C language provides a capability that enables the user to define a set of ordered data items known as an array. Suppose we had a set of grades that we wished to read into the computer and suppose we wished to perform some operations on these grades, we will quickly realize that we cannot perform such an operation until each and every grade has been entered since it would be quite a tedious task to declare each and every student grade as a variable especially since there may be a very large number. In C we can define a variable called grade, which represents not a single value of grade but an entire set of grades. Each element of the set can then be referenced by means of a number called an index number or subscript. Declaration of arrays Like any other variable arrays must be declared before they are used. The general form of declaration is: type variable-name [50]; The type specifies the type of the elements that will be contained in the array,

Cloud Computing Cloud Services

Cloud Services  There are 5 commonly used categories in a spectrum of cloud offerings Platform-as-a-service (PaaS) -Provision H/W, OS, Framework, Database Software-as-a-service (SaaS) - Provision H/W, OS, Special purpose S/W Infrastructure-as-a-service (IaaS) - Provision H/W and organization has control over OS Storage-as-a-service (SaaS) - Provision of DB-like services, metered like - per gigabyte/month Desktop-as-a-service (DaaS) - Provision of a Desktop environment within a browser Platform as a service PaaS stands for the platform as a service. PaaS provides a computing platform with a programming language execution environment. PaaS provides a development and deployment platform for running applications in the cloud. PaaS constitute the middleware on top of which applications are built. Application management is the core functionality of the middleware. PaaS provides run-time environments for the applications. PaaS provides Applications deployment Configuring application co

Cloud Computing, its Characteristics and Types

Image
Cloud Computing Cloud computing is an emerging style of computing where applications, data, and resources are provided to users as services over the web. Cloud Computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources such as networks, servers, storage, applications, and services that can be made available rapidly and released with minimal service provider interaction. Cloud computing is the use of networked infrastructure software and capacity to provide resources to users in an OnDemand environment. Cloud Computing is an emerging consumption and delivery model that enables the provisioning of standardized business and computing services through a shared infrastructure, the where-in end user is enabled to control the interaction in order to accomplish the business task. Computing resources such as hardware, software networks, storage, services, and interfaces are no longer confined within the four walls of

Matrix Inverse: Matrix Inversion Technique

Image
Matrix Inversion Technique  The inverse of a matrix The inverse of a square n × n matrix A is another n × n matrix denoted by A -1  such that AA -1 =A -1 A=I where I is the n × n identity matrix. That is, multiplying a matrix by its inverse produces an identity matrix. Not all square matrices have an inverse matrix. If the determinant of the matrix is zero, then it will not have an inverse, and the matrix is said to be singular. Only non-singular matrices have inverses. A formula for finding the inverse Given any non-singular matrix A, its inverse can be found from the formula A -1  = adj A |A| where adj A is the adjoint matrix and |A| is the determinant of A. The procedure for finding the adjoint matrix is given below. Finding the adjoint matrix The adjoint of a matrix A is found in stages: Find the transpose of A, which is denoted by A T . The transpose is found by interchanging the rows and columns of A. So, for example, the first column of A is the first row of the transpo

Operator Overloading Types and Rules | C++ Programming

Operator Overloading It is the mechanism of giving special meanings to an operator. By overloading operators, we can give additional meanings to operators like +, *, -, <=, >=, etc. which by default are supposed to work only on standard data types like ints, and floats. In general, a = b + c; works only with basic types like ‘int’ and ‘float’, and attempting to apply it when a, b and c are objects of a user-defined class will cause complaints from the compiler. But, using overloading, we can make this statement legal even when a, b and c are user-defined types (objects). Even though the semantics of an operator can be expressed, we cannot change its syntax. When an operator is overloaded, its original meaning is not lost. The grammar rules defined by C++ that govern its use such as the number of operands, precedence, and associatively of the operator remain the same for overloaded operators.  We can overload (give additional meanings to) all the C++ operators except the follo

Friend Functions | C++ Programming

Image
Friend Functions Friend Function A function is said to be a friend function of a class if it can access the members (including private members) of the class even if it is not the member function of this class. In other words, a friend function is a non-member function that has access to the private members of the class. Characteristics of a friend function: A friend function can be either global or a member of some other class. Since the friend function is not a part of the class, it can be declared anywhere in the public, private, and protected sections of the class. It cannot be called by using the object of the class since it is not in the scope of the class. It is called a normal function without the help of any object. Unlike member functions, it cannot access member names directly. So, it has to use an object name and dot operator with each member name (like A.x) It, generally, takes objects as arguments. The concepts of data hiding and encapsulation dictate that private