
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 7197 Articles for C++

26K+ Views
In C/C++, an input buffer is a temporary storage area where the program processes the input. Suppose, you are an user and you type some characters using a keyboard but those characters are not passed to the program directly because it involves several layers of handling such as keyboard firmware, OS input queues, and event processing. So, they first proceed with the collection of an input buffer. Next, when the program is ready, it reads from the buffer. How Input Buffer Affects a Program? The input buffer affected to the program when we are using the functions like scanf() or ... Read More

26K+ Views
In C language, header files contain the set of predefined standard library functions. The "#include" preprocessing directive is used to include the header files with ".h" extension in the program. Here is the table that displays some of the header files in C language, Sr.No. Header Files & Description 1 stdio.hInput/Output ... Read More

15K+ Views
stdio.hThe header file stdio.h stands for Standard Input Output. It has the information related to input/output functions.Here is the table that displays some of the functions in stdio.h in C language, Sr.No.Functions & Description1printf()It is used to print the strings, integer, character etc on the output screen.2scanf()It reads the character, string, integer etc from the keyboard.3getc()It reads the character from the file.4putc()It writes the character to the file.5fopen()It opens the file and all file handling functions are defined in stdio.h header file.6fclose()It closes the opened file.7remove()It deletes the file.8fflush()It flushes the file.Here is an example of stdio.h in C language, ... Read More

253 Views
The function islessgreater() is used to check that first argument is less than or greater than the second one. It is declared in “math.h” header file in C language. It returns true, if successful otherwise false.Here is the syntax of islessgreater() in C++ language, bool islessgreater(value1 , value2);Here, value1 − This is the first argument which will be checked with value2.value2 − This is the second argument which is used to check value1 and see that is less or greater.Here is an example of islessgreater() in C++ language, Example Live Demo#include #include using namespace std; int main() { int ... Read More

818 Views
In C++, converting a string into uppercase means changing all the characters into uppercase. This is a common requirement in many applications, such as formatting output, standard data input, and case sensitivity. Following is the table that shows the conversion of string to uppercase: String Case Characters Uppercase Characters ... Read More

377 Views
The function isless() is used to check that first argument is less than the second one. It is declared in “math.h” header file in C language. It returns true if successful otherwise it returns false.Here is the syntax of isless() in C language, bool isless(value1 , value2);Here, value1 − This is the first argument which will be checked with value2.value2 − This is the second argument which is used to check value1 ans see that it is less or not.Here is an example of isless() in C language, Example Live Demo#include #include int main() { int val1 = 48; ... Read More

39K+ Views
Both isalpha() and isdigit() are the part of C/C++ library function which can be used to check whether a given character is an alphabetical letter or a digit, respectively. These fuctions accept the given character/digit as input and determine the presence of letter or digit in correct/incorrect form. What is isalpha() in C/C++? The isalpha() function is used to check that a character is an alphabet or not. This function is declared in ctype.h header file. It returns an integer value, if the argument is an alphabet otherwise, it returns zero. Syntax Following is the basic syntax of isalpha() in ... Read More

422 Views
The function getchar_unlocked() is deprecated in Windows because it is a thread unsafe version of getchar(). It is suggested not to use getchar_unlocked(). There is no stream lock check that’s why getchar_unlocked is unsafe. The function getchar_unlocked() is faster than getchar().Here is the syntax of getchar_unlocked() in C language, int getchar_unlocked(void);A program of getchar_unlocked() in C is as follows −Example Live Demo#include int main() { char val; val = getchar_unlocked(); printf("Enter the character : "); printf("Entered character : %c", val); return 0; }OutputHere is the outputEnter the character : a Entered character : aRead More

7K+ Views
The queue which is implemented as FIFO where insertions are done at one end (rear) and deletions are done from another end (front). The first element that entered is deleted first. Queue operations EnQueue: Insertion at rear end. DeQueue(): Deletion from front end. But a priority queue doesn’t follow First-In-First-Out, but rather than each element has a priority based on the level of importance. Items with the same priority are processed on First-In-First-Out service basis. An item with higher priority ... Read More

31K+ Views
A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e the element that is inserted first is also deleted first.A circular queue is a type of queue in which the last position is connected to the first position to make a circle.A program to implement circular queue in C++ is given as follows −Example#include using namespace std; int cqueue[5]; int front = -1, rear = -1, n=5; void insertCQ(int val) { if ((front == 0 && rear == n-1) || (front == rear+1)) { cout