Tuesday, August 14, 2012

How to Write a Program Which will tell you a number is Even or Odd


#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf(“\n\t\t\t\t\Enter Your Value”);
scanf(“%d”,&a);
b=a/2;
c=b%1;
if(c==0)
{
printf(“\t\t\tThis is Even Number”);
}
if(c!=0)
{
printf(“\t\t\tThis is Odd Number”);
}
getch();
}

How to Write a Program Which give result of your Current Age, Total Months, Total Weeks, All Seconds etc.


#include<stdio.h>
#include<conio.h>
void main()
{
long int bd,cy,age,month,week,days,hour,minute,second;
cy=2012;
clrscr();
                      printf(“\n\n\n\t\t\t\tEnter Your Birth Year “);
                      scanf(“%ld”,&bd);
                      age=cy-bd;
                      month=age*12;
                      week=month*4;
                      days=month*30;
                      hour=24*days;
                      minute=60*hour;
                     second=minute*60;
                     printf(“\n\t Your Age is %ld\n\t Your All Months %ld\n\t Youe All Weeks are %ld”,age,month,week);
                     printf(“\n\t Your All Days are %ld \n\t Your Total Hourse %ld”,days,hour);
                     printf(“\n\t Your Minutes are %ld \n\t Your All Seconds %ld”,minute,second);
getch();
}

Write a Program How to Convert Km in m,cm,inch and ft.


#include<stdio.h>
#include<conio.h>
void main()
{
float km,m,cm,inch,ft;
clrscr();
printf(“km”);
scanf(“%f”,&km);
m=km*1000;
cm=m*1000;
inch=cm*1000;
ft=inch*1000;
printf(“Your Kilo Meter is %f\n”,km);
printf(“Your Meter is %f\n”,m);
printf(“Your CM  is %f\n”,cm);
printf(“Your Inch is %f\n”,inch);
printf(“Your feet is %f\n”,ft);
getch();
}

Write a Program How to convert Celsius to Fahrenheit


#include<stdio.h>
#include<conio.h>
void main()
{
float c,f;
clrscr();
printf(“Enter Current Celsius”);
scanf(“%f”,&c);
f=(c-32)*5/9;
printf(“Your Current Fahrenheit is %f”,f);
getch();
}

C- Assignment 1 FYBCA


1.       Define program & programming Language.
2.       Sate difference between Machine & Higher level Language.
3.       State difference between Assembly & Machine level Language.
4.       State difference between Compiler & Interpreter.
5.       List out example of Low-Level & High level programming language.
6.       List out some example of Assembly level programming language.

C- Assignment 2 FYBCA


1.       Describe Algorithm with proper example.
2.       Describe all Symbols of Flow-Chart with proper example.
3.       Write algorithm and draw flowchart with for converting temperature entered in Farenheit to Celsius.
4.       Write algorithm and draw flowchart to find area perimeter of square.
5.       Write algorithm and draw flowchart to convert distance entered in km to meter, cm, inch & feet.

C- Assignment 3 FYBCA


1.       Describe important characteristics of C-programming.
2.       Sate the importance of comment lines
3.       Explain print() function with example?
4.       State use of stdio.h & conio.h header files.
5.       Describe basic structure of C-Program
6.       State difference between void main() & int main()
7.       List out important characteristics of C.

C- Assignment 4 FYBCA


1.       Define Syntax.
2.       List out character set in C with example.
3.       Define C-Token.
4.       Sate different between Keywords % identifiers with example.
5.       List out all types of constants with example.
6.       Define Variable & list rules for define Variables.
7.       List out three categories of Data-type.
8.       List out types of Basic data type, Derived data type, User-Define data type.
9.       Describe scanf() function with example?
10.   State use of void data type?
11.   State difference between Assigning values to variables & Initialization value to variable.
12.   State the use of const keyword with example?
13.   Define Symbolic Constant.