
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

4K+ Views
In this section, you will learn how to use SQLite in C/C++ programs.InstallationBefore you start using SQLite in our C/C++ programs, you need to make sure that you have SQLite library set up on the machine. You can check the SQLite Installation chapter to understand the installation process.C/C++ Interface APIsFollowing are important C/C++ SQLite interface routines, which can suffice your requirement to work with SQLite database from your C/C++ program. If you are looking for a more sophisticated application, then you can look into SQLite official documentation.Serial NoAPI & Description1sqlite3_open(const char *filename, sqlite3 **ppDb)This routine opens a connection to an ... Read More

7K+ Views
In C++, virtual and pure virtual functions are key features supporting polymorphism both allow different classes to respond uniquely to the same function call. What is Virtual Function A virtual function in C++ is a member function in a base class, which allows a function to be overridden in the derived class. This process helps in enabling runtime polymorphism. A virtual function is declared in the base class using the virtual keyword. Syntax Following is the syntax of the virtual function: class BaseClassName { public: virtual void func_name() { // implementation ... Read More

8K+ Views
An lvalue (locator value) represents an object that occupies some identifiable location in memory (i.e. has an address).rvalues are defined by exclusion. Every expression is either an lvalue or an rvalue, so, an rvalue is an expression that does not represent an object occupying some identifiable location in memory.For example, An assignment expects an lvalue as its left operand, so the following is valid:int i = 10; But this is not: int i; 10 = i;This is because i has an address in memory and is a lvalue. While 10 doesn't have an identifiable memory location and hence is an ... Read More

782 Views
A pure virtual function is a function that has no implementation in the base class and must be overridden by any derived class. It is declared using = 0 in the base class. Pure Virtual Destructor When we want the base class to be abstract then we declare a pure virtual Destructor. A pure virtual Destructor can be declared in C++ after a destructor has been created as a pure virtual object. One of the most important things is that if a class contains a pure virtual destructor, it must provide a function body for the pure virtual destructor. ... Read More

4K+ Views
In this section we will see what is the fork system call in C. This fork system call is used to create a new process. This newly created process is known as child process. The current process which is creating another child process is called the parent process.A child process uses the same program counter, CPU register, same files that are used by the parent process.The fork() does not take any parameter, it returns integer values. It may return three types of integer values.Negative Number: It returns negative number when child process creation is failedZero Value: It returns Zero for ... Read More

473 Views
What is an Assertions in C/C++? An assertion is a statement used to test assumptions made by the program. When an assertion fails, the program displays an error and stops. This is mainly used for debugging. In C and C++, assertions are handled using the assert() macro defined in the (C) or (C++) header file. Following is the declaration for assert() Macro. #include // in C // or #include in C++ assert(expression); The parameter of this assert() is expression: This can be a variable or any C/C++ expression. If ... Read More

22K+ Views
Multithreading is a specialized form of multitasking and a multitasking is the feature that allows your computer to run two or more programs concurrently. In general, there are two types of multitasking: process-based and thread-based.Process-based multitasking handles the concurrent execution of programs. Thread-based multitasking deals with the concurrent execution of pieces of the same program.A multithreaded program contains two or more parts that can run concurrently. Each part of such a program is called a thread, and each thread defines a separate path of execution.C does not contain any built-in support for multithreaded applications. Instead, it relies entirely upon the ... Read More

1K+ Views
In C/C++, we use the header files for accessing functions such as int, char, string, etc. The printf() function of C is also a built-in function that is declared in the "stdio.h" header file and it is used to print any kind of data on the console. C to Print "Hello World" without Header Files The Hello World is the given string that is used in the printf() to get the output. Make sure you don't have any headers to print the result. So, use an argument like (const char *text, ...) that solves the problem. Syntax Below is the ... Read More

223 Views
In this section we will see how to execute the if and else section simultaneously in a C or C++ code. This solution is little bit tricky.When the if and else are executed one after another then it is like executing statements where if-else are not present. But here we will see if they are present how to execute them one after another.Example Code#include using namespace std; int main() { int x = 10; if(x > 5) { lebel_1: cout

2K+ Views
In this section we will see how to convert an integer number to a string.The logic is very simple. Here we will use the sprintf() function. This function is used to print some value or line into a string, but not in the console. This is the only difference between printf() and sprintf(). Here the first argument is the string buffer. where we want to save our data.Input: User will put some numeric value say 42Output: This program will return the string equivalent result of that number like “42”Algorithm:Step 1: Take a number as argument Step 2: Create an empty ... Read More