C Program to Check whether a Number is Prime or Not

Write a c program to check whether a number is prime or not. Given an integer, We have to write an efficient code to check whether a number is prime or not.

Program to Print 1 to 100 Numbers without using Loop

Write a program to print 1 to 100 numbers without using loop. Using loop, (for and while loop) we can easily solve this problem. Think for a moment how do you solve this problem without using a loop. We can solve this problem using recursion.

C Program to Print Fibonacci Series using Recursion

Write a C program to print Fibonacci Series using recursion. Given an input number, we have to write a code to print Fibonacci series up to that number using Recursion.

This question is very important in terms of technical interviews.

You can check my previous post for PHP script to print Fibonacci series in PHP.

What is Recursion?

In recursion, A function calls itself until the base condition is reached. Recursive code is much cleaner and shorter as compared to iterative code.
For better understanding you can my previous post on recursion and what’s the difference between recursion and iteration.

For practice, you can solve Objective Question on Recursion

Pre-increment Vs Post-increment Operators- MCQ for Practice & Explanation

Pre-increment Vs Post-increment operators. What’s the difference between pre-increment (++i) and post-increment (i++) operators.  In this post, we’ll learn how pre-increment and post-increment operators work in programming.

In this post, You’ll find MCQ which will help you to understand this concept fully.

Swap Two Numbers using Call by Reference in C

How to swap two numbers using call by reference in C , C++. In the interviews interviewer generally asked the difference between call by reference and call by value. In this post let’s understand what is call by reference and how to swap two numbers using call by reference method.

C Program to Count Number of Words in a String

Write a C program to count number of words in a string. Given an input string, we have to write a code to count number of words in a string. The words in a string are separated by space(‘ ‘).

C Program to Insert a Node at the Beginning of Linked List

Write a C program to insert a node at the beginning of linked list. In this tutorial, we create a linked list and insert a new node at the beginning/head of linked list.

A Linked list is a linear data structure which consists a group of nodes and each node points to next node by means of a pointer. In Linked list, a node consists of two parts, a data and a pointer to next node.

C Program to Swap two Numbers without using third variable

Write a c program to swap two numbers without using third variable. Given two input numbers, We have to write a code to swap two numbers without using third variable. In my previous post, I have explained a c program to swap two numbers using third variable. This question is generally asked in an interview.

Programming questions on linked list

Swap two numbers using Bitwise XOR Operator

C Program to Swap Two Numbers using Third Variable

Write a c program to swap two numbers using third variable. Given two input integers, We have to write a code to swap two numbers using a third or temporary variable.

C Program to swap two numbers without using third variable

Swap two numbers using a pointer

Swap two numbers using bitwise XOR operator

Programming questions on various topics for practice

C Program to Print Hello World without using Semicolon

Write a C program to print hello world without using semicolon. It’s an interesting problem as in C every line is terminated with a semicolon. So, how do we write a c program to print hello world without using semicolon.