What is C++ ?

What is C++? what is C++, as we all know is an extension to C language and was developed by Bjarne Stroustrup at bell labs C++ is an open source, middle label, preprocessed, compiled, assembled, linked and loaded, procedure-oriented and object-oriented, statically typed, general-purpose programming language. Open source:- C++ is developed by an ISO standard committee. The… Continue reading What is C++ ?

Semaphore and It’s Uses

Semaphores The solutions to the critical-section problem presented before are not easy to generalize to more complex problems. To overcome this difficulty, we can use a synchronization tool called a semaphore. A semaphore S is an integer variable that, apart from initialization, is accessed only through two standard atomic operations: wait and signal. These operations… Continue reading Semaphore and It’s Uses

Synchronization Hardware

Synchronization Hardware As with other aspects of software, hardware features can make the programming task easier and improve system efficiency. In this section, we present some simple hardware instructions that are available on many systems and show how they can be used effectively in solving the critical-section problem. The definition of the TestAndSet instruction. boolean… Continue reading Synchronization Hardware

Storage Class in C

Storage Class in C:- Every c program has a storage class and a scope. The storage class is a data structure that decides the scope, storage default initial value, and life of variable function. Different types of scope and rules present in c:- Program scope File scope Function scope Block scope Program scope:- If a… Continue reading Storage Class in C

Function in C

Function in C:- A function is a set of statements that are encapsulated together to perform a particular task. There are basically 3 types of function:- User-defined function Standard Library function System Calls User-defined function:- When the library function is not sufficient enough to solve the current problem then immediately the developer writes the code… Continue reading Function in C

String,String Buffer and String Builder in JAVA

String, String Buffer and String Builder in JAVA:- String:- String is predefined final class present in the default package. As string is a final class it cannot be inherited. String is purely immutable(contents cannot be changed) in nature that contents of the string cannot be changed once it assigns. How string is immutable? PROGRAM:- class… Continue reading String,String Buffer and String Builder in JAVA

Dynamic Memory Allocation

Dynamic Memory Allocation:- Every program allocates memory during the runtime and load time, but how much memory will be allocated during the runtime is called dynamic memory allocation. If the size is decided during the compile time only that called static memory allocation. Entire 4GB memory is split into two parts such as lower 3GB… Continue reading Dynamic Memory Allocation

Array in JAVA

Array in JAVA:-    Array in Java is a collection of similar types of data store in sequential order. It is used to create a list Array is static in nature. Array size is known. Array cannot be shrinked. Types of array:- Array is two types:- single dimensional array multidimensional array Array construction:- Array construction possible… Continue reading Array in JAVA

String in C

String in C:- A string in C is a character array terminated with a null character. All the string are character array but all the character array is not a string. main() {             char p[]={‘a’,’b’,’c’,’d’};             char q[]={‘a’,’b’,’c’,’d’,’\0’}; } Here p is a character array and q is a string. Anything is written within… Continue reading String in C

Pointer in C

Pointer in C:- A pointer in C is a variable which refers only address. (address is a location in memory). Pointer is 4byte because an address is a 4 byte long. Pointer cannot refers any address beyond 4GB of memory in GCC compiler. APPLICATION OF THE POINTER:- It is used for dynamic memory allocation and… Continue reading Pointer in C

Array in C

Array in C:- Array in C  is a variable that can hold more than one similar type of element. It is sequential in nature. Array index starts from zero which is known as the lower boundary of an array. Array upper boundary is (Array size-1). To access each element of array called traversing of the… Continue reading Array in C

Control Structure in C

CONTROL STRUCTURE:- Hanging if is not allowed in C language. If a statement is used for checking range and yes/no problem. else is the optional part of the if. Execution of the switch case starts from the match case. Use break to prevent the falling of control from one case to another case. If none… Continue reading Control Structure in C

Uses of Super keyword in java

Working with super keyword:- Super keyword in java which can be used to solve 3 different problems. Super always refers to parent class object. superkeyword in Java is a reference variable that is used to refer parent class objects Super keyword only can be placed within a non-static method or nonstatic block or constructor. Whenever… Continue reading Uses of Super keyword in java

Operator in C

Operator in C:- Operator in C :- 1) Precedence and associativity of an operator only implemented if it is represented in INFIX notation. Precedence decides which operation will be performed first. Associativity decides the order of evaluation ( left to right or right to left) if more than one operator enjoy the same precedence. The… Continue reading Operator in C