Skip to content
All Easy Articles
Asked by Anshya.Below are the different ways to add base 14 numbers.Method 1 Thanks to Raj for suggesting this method.  1. Convert both i/p base 14… Read More
We all know that a function in C can return only one value. So how do we achieve the purpose of returning multiple values. Well,… Read More
First of all, what is function overloading? Function overloading is a feature of a programming language that allows one to have many functions with same… Read More
  Given a linked list, check if the linked list has loop or not. Below diagram shows a linked list with a loop.     Recommended:… Read More
  Given pointer to the head node of a linked list, the task is to reverse the linked list. We need to reverse the list… Read More
Predict the output of below programs  Question 1   c int main() {     while(1){         if(printf("%d",printf("%d")))             break;         else             continue;     }     return 0; } Output: Can’t be predictedExplanation: The condition… Read More
I’m sure this post will be as interesting and informative to C virgins (i.e. beginners) as it will be to those who are well-versed in… Read More
What are these? Little and big endian are two ways of storing multibyte data-types ( int, float, etc). In little endian machines, last byte of… Read More
Solution: Use sprintf() function. #include<stdio.h> int main() {     char result[50];     float num = 23.34;     sprintf(result, "%f", num);     printf("\n The string for the num is %s",… Read More
Write a “C” function, int addOvf(int* result, int a, int b) If there is no overflow, the function places the resultant = sum a+b in… Read More
Predict the output of the below program. Question 1  c #include <stdio.h> int main() {   printf("%p", main);   getchar();   return 0; } Output: Address of function main. Explanation:… Read More
Predict the output of below programs. Question 1  c #include<stdio.h> char *getString() {     char str[] = "Will I be printed?";        return str; } int main() {… Read More
Predict the output of below programs. Question 1 #include<stdio.h> int main() {    int n;    for(n = 7; n!=0; n--)      printf("n = %d", n--);    getchar();    return… Read More
The eight queens problem is the problem of placing eight queens on an 8×8 chessboard such that none of them attack one another (no two… Read More
What should be the “condition” so that the following code snippet prints both HelloWorld! if "condition" printf ("Hello"); else printf("World"); Method 1: #include<stdio.h> int main()… Read More
Power Set Power set P(S) of a set S is the set of all subsets of S. For example S = {a, b, c} then… Read More
Write a one line function to return position of first 1 from right to left, in binary representation of an Integer.  I/P 18, Binary Representation… Read More
Given a positive integer, write a function to find if it is a power of two or not.Examples :  Input : n = 4 Output… Read More
Given a positive integer, write a function to find if it is a power of two or not. Examples : Input : n = 4… Read More