Category: C Programming

  • Here, we shall look at a few simple problems for printing number series, and see how to design for loop to solve them. (For the previous tutorial in this series, click here: for loop tutorial – Part 1) (For more on C Programming, see here: posts on C Programming) We looked at some simple for…

  • Here, we shall look at an introduction to for loops in C. (For posts on while loops, pls see here. For posts on C Programming, pls see here.) We shall look at certain basic aspects of loop, and look at an example program. Above, we looked at certain important aspects of loops, and looked at…

  • Here, we’ll use while loop to compute the sum of a few number series. (You can see part 4 of the while loop tutorial here.) Q.1. Write a C program to compute 1 + 2 + 3 + … + n, using while loop. Here, n (>=1) is input given by the user. Answer. Explanation:…

  • while loop tutorial – Part 4. (You can view Part 3 here.)Several simple programs using while loop to display numbers are given here. Some programs using while loop in C to display numbers: Q.1. Display numbers from 1 to 6. Using while loop. Answer. Explanation- We need to print all numbers from 1 to 6.…

  • (You can see Part 2 of the tutorial here: while loop tutorial – Part 2) Some more simple programs using while loop in C. Pls refer to the pictures above. Q.1. Write a program to display Jai Sriman Narayana 5 times. Answer. // Program to display Jai Sriman Narayana 5 times #include <stdio.h> int main(){int…

  • Simple programs using while loop in C. See Part 1 on while loops here. Q.1. Write a C program to print Good Morning three times. Solution. // This program displays Good Morning 3 times on the screen #include <stdio.h>int main(){ int i = 1; //set initial value of the loop counter while (i <= 3)…

  • Introducing while loop in C. Simple program with detailed explanation. (Similar post on while loop is here.) (For Part 2 of this tutorial, see here.) Introducing while Loop in CLoops are used to execute a specific piece of code multiple times. As long as the condition is true, the block of code within the while…

  • We’ll look at a simple program using while loop, and explain in detail the working of the program. (Related to course – Programming in C (CS 3251) of Anna University.) Print Hello on the Screen (One Time) Let us first write a simple program to print Hello on the screen one time. Output Print Hello…

  • Past year exam questions and answers. Programming in C (CS 3251). Unit 1. Assignment operator and equality operator.(See Part 4 here: 16 marks Q-A on struct (Unit 4). ) Q.3. (April/May 2022) 2 marks, Unit 1. What is the difference between a=5 and a==5? Answer. Supplementary Notes Assignment Operator (=) Example 1: Output:10 Example 2:…

  • Question and Answer. From Anna University past year exam papers for Programming in C – CS 3251. Types of Operators in C Anna University Exam Question Q.2. (2 Marks) (Nov/Dec 2022) Unit 1. What are various types of operators in C? Answer Note: Since this is just a 2-mark question, all this information may not…

Is this your new site? Log in to activate admin features and dismiss this message
Log In