Skip to content
Gblog GeeksforGeeks Job-A-Thon Exclusive – Hiring Challenge For Amazon Alexa
Getting a job in Product Based Companies is a dream come true for everyone and when we talk about Amazon, every one of us wants… Read More
The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning.… Read More
The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning.… Read More
  Given two variables, x, and y, swap two variables without using a third variable.  Method 1 (Using Arithmetic Operators)  The idea is to get… Read More
When fopen() is not able to open a file, it returns (A) EOF (B) NULL (C) Runtime Error (D) Compiler Dependent Answer: (B) Explanation: fopen()… Read More
#include <stdio.h> #include <stdlib.h>    int main(void) {     int i;     int *ptr = (int *) malloc(5 * sizeof(int));        for (i=0; i<5; i++)         *(ptr +… Read More
We have discussed BST search and insert operations. In this post, the delete operation is discussed. When we delete a node, three possibilities arise.  1)… Read More
The following is the definition of Binary Search Tree(BST) according to Wikipedia Binary Search Tree is a node-based binary tree data structure which has the… Read More
#include <stdio.h> #include <dirent.h>    int main(void) {     struct dirent *de;  // Pointer for directory entry        // opendir() returns a pointer of DIR type. … Read More
Given an array of integers, find the sum of its elements. Examples : Input : arr[] = {1, 2, 3} Output : 6 1 +… Read More
Given an array of integers. Write a Java Program to find the sum of the elements of the array. Examples: Input : arr[] = {1,… Read More
Given an array of integers, find sum of its elements. Examples : Input : arr[] = {1, 2, 3} Output : 6 1 + 2… Read More
Given an array of integers, find sum of its elements.Examples :  Input : arr[] = {1, 2, 3} Output : 6 1 + 2 +… Read More
/* C Program to count the Number of Lines in a Text File  */ #include <stdio.h> #define MAX_FILE_NAME 100    int main() {     FILE *fp;… Read More
Which of the following true about FILE *fp (A) FILE is a keyword in C for representing files and fp is a variable of FILE… Read More
#include <stdio.h> int main() {     if (sizeof(int) > -1)         printf("Yes");     else         printf("No");     return 0; } (A) Yes (B) No (C) Compiler Error (D) Runtime Error… Read More

Start Your Coding Journey Now!