Monday, 15 December 2014

LOOP

What is Loop?



Loop are the statements in programs which are executed several times to get specified results.

A loop can created to some repetitive kind of task. Assume You have print your name 2 times?

Wednesday, 19 November 2014

C language Question/Model Paper

Question/Model Paper
Q1. The Following program fragment
        int 1=107,x=5;
        printf((x>7)?"%d":"%c",1);

       (a) an execution error            (b) a syntax error
       (c) printing of k                     (c) None of the above

Q2. Choose an correct statement
       
       (a) for loop can be nested
       (b) Nested for loop may use the same index
       (c) While can be nested
       (d) Both a and c

Monday, 10 November 2014

C Questions With Answers

C Questions
Q1. What is C language? Define in brief.
Q2. Write a program to input a string and determine it is Palindrome or not.
Q3. What is ASCII? Write a program to show the ASCII of ‘a’ to ‘z’.
Q4. What is Loop? Where it is applied? Write a program to print the following

*
***
*****
***
*
1
121
12321
121
1
54321
4321
21
1

Tuesday, 28 October 2014

What is a Palindrome Number? Checking whether a number is palindrome or not !

Palindrome

A number which is read from both sides but doesn't make change called a palindrome number
.
just like word "MADAM" you can read this word from both sides the outcome will always MADAM.

This situation can also be in Integer number that called palindrome number.  
 For Ex.
               121

Adding all digit of a Given Number in C

Input = 123456
output = 21                                  //(1+2+3+4+5+6)
To add all digits of number we will simply write a loop and just take the last digit from the given number and remove one digit from the given number. The loop will continues till the number is greater than 0.

To do this we will use the while loop.

How To Enter A Number And Reverse it in C


Input -   123456
Output - 654321

#include<stdio.h>

void main()
{

Saturday, 4 October 2014

Adding two Numbers




To add two numbers we will simply just create three variables, two for  the numbers and one for the result. See example






         int main()

Creating Variables & Data types

Variables 

Constant are the term that can not be changed at the time of program execution some time we need to change the value of variable so we use variables in this condition.

Variables are nothing just given name to the particular space of our memory.


Tuesday, 30 September 2014

Introduction of C


From the beginning of Electronic Computing a new topic took place, because our computer is re programmable so we have to program it.

First Post (INTRODUCTION)

int main()
{
          int i;
          for(i=1;i<=10;i++)