Earn by twitter on twivert

Sign up for PayPal and start accepting credit card payments instantly.

Monday, December 5, 2011

Student record using Array of Structure in c

/*WAP of Student record using Array of Structure in c*/
#include<stdio.h>
#include<conio.h>
struct student
{
 int rollno, marks1,marks2,marks3,tot;
 char name[25],grade;
 float per;
};
void main()
{
 struct student s[5];     //Data type of '*s' is struct student
 int i;
 clrscr();
 printf("\t*Students Records*\n");
 //take input from user
 for (i=0; i<5; i++)
 {
 printf("\nEnter Student Roll Number: ");
 scanf("%d", &s[i].rollno);
 printf("\nEnter Student name: ");
 scanf("%s", s[i].name);
 printf("\nEnter Student 3 subject's marks: ");
 scanf("%d%d%d", &s[i].marks1,&s[i].marks2,&s[i].marks3);
 //calculation
 s[i].tot = s[i].marks1 + s[i].marks2 + s[i].marks3;
 s[i].per = s[i].tot/3;
 if(s[i].per>=75){
  s[i].grade = 'A';
 }
 else if(s[i].per<75 && s[i].per>=60){
  s[i].grade = 'B';
 }
 else if(s[i].per<60 && s[i].per>=50){
  s[i].grade = 'C';
 }
 else if(s[i].per<50 && s[i].per>=40){
  s[i].grade = 'D';
 }
 else if(s[i].per<40 && s[i].per>=33){
  s[i].grade = 'E';
 }
 else {
  s[i].grade = 'F';
 }
 }
 //Display result
 for (i=0; i<5; i++)
 {
 printf("\n==================================\n");
 printf("\nStudent's Roll no. - %d", s[i].rollno);
 printf("\nStudent's Name - %s", s[i].name);
 printf("\nStudent's Total Marks - %d", s[i].tot);
 printf("\nStudent's Percentage - %f", s[i].per);
 printf("\nStudent's Grade - %c", s[i].grade);
 }
 getch();
}

Student record using Structure in c

/*WAP of Student record using Structure in c*/
#include<stdio.h>
#include<conio.h>
struct student
{
 int rollno, marks1,marks2,marks3,tot;
 char name[25],grade;
 float per;
};
void main()
{
 struct student s;  //Data type of '*s' is struct student
 clrscr();
 //take input from user
 printf("Enter Student Roll Number: ");
 scanf("%d", &s.rollno);
 printf("\nEnter Student name: ");
 scanf("%s", s.name);
 printf("\nEnter Student 3 subject's marks: ");
 scanf("%d%d%d", &s.marks1,&s.marks2,&s.marks3);
 //calculation
 s.tot = s.marks1 + s.marks2 + s.marks3;
 s.per = s.tot/3;
 if(s.per>=75){
  s.grade = 'A';
 }
 else if(s.per<75 && s.per>=60){
  s.grade = 'B';
 }
 else if(s.per<60 && s.per>=50){
  s.grade = 'C';
 }
 else if(s.per<50 && s.per>=40){
  s.grade = 'D';
 }
 else if(s.per<40 && s.per>=33){
  s.grade = 'E';
 }
 else {
  s.grade = 'F';
 }
 //Display result
 printf("\n==================================\n");
 printf("\nStudent's Roll no. - %d", s.rollno);
 printf("\nStudent's Name - %s", s.name);
 printf("\nStudent's Total Marks - %d", s.tot);
 printf("\nStudent's Percentage - %f", s.per);
 printf("\nStudent's Grade - %c", s.grade);

 getch();
}

Tuesday, November 15, 2011

length of array in c

/*WAP to Calculate length of array in c*/

#include<stdio.h>
#include<conio.h>

int array[6]12345};
void main() {
  clrscr();
  int len=sizeof(array)/sizeof(int);
  printf("Length Of Array=%d", len);
  getch();
}

 

Monday, February 14, 2011

Save downloads to a different directory


Save downloads to a different directory.
These tips apply primarily to Windows 7

fie Windows 7 Downloads directory sounds convenient, but since few 
users ever go browsing there, downloaded files may be forgotten for 
days. Most browsers will default to downloading into this directory. 
Firefox and Chrome users can change this relatively easily, though, 
to something more convenient. In Firefox, click Tools Options. Under 
the General tab, change the ‘Save files to’ setting to the directory 
of your choice. In Google Chrome, click the Tools icon (it looks like 
a wrench), then Options. Click the Minor Tweaks tab and change the 
‘Download location’ setting there. IE users unfortunately have to hack 
the Registry to make this change (a step that only power users should 
consider taking).

Friday, January 28, 2011

Use Windows’ Problem Steps Recorder


Use Windows’ Problem Steps Recorder.
These tips apply primarily to Windows 7

Tech support calls are a pain. If you’re having computer problems, 
don’t get stuck on an endless phone call trying to explain the 
difficulty. Run Windows’ Problem Steps Recorder to save a step by 
step history of what you’re doing so you can share it with a friend 
or tech support pro. Type PSR in the Start menu search box to find 
and run the recorder. Then go through the steps that lead to your 
problem; PSR will record a screenshot of each step, logging everything 
you type and click. When you’re finished, click the Stop button and save
the file. E-mail the archive to someone who’s better informed for a 
solution. (Note: this resource can also be used to make quick-and-dirty 
tutorials.)

Monday, January 24, 2011

LIKE command with % when character at middle


LIKE command with % when character at middle

select stdName,stdAddress
from student
where stdAddress like '%a%'

Wednesday, January 12, 2011

LIKE command with % when character at starting


LIKE command with % when character at starting

select stdName,stdAddress
from student
where stdName like 'A%'

Sunday, January 9, 2011

LIKE command when with % character at ending


LIKE command when with % character at ending

select stdName,stdAddress
from student
where stdName like '%a'

ADS

How to earn online

How to earn online:
Step - 1 :
signup for PayPal, to recieve your online earning
click here:
https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL
step - 2 : Singup these 4 sites & earn & enjoy! Read site to know how to earn.
1. trekpay
Earn up to $0.02 (2 cents) per click.
http://www.trekpay.com/?ref=34690
2. neobux
Earn up to $0.02 (2 cents) per click.
Click here:
http://www.neobux.com/?r=Moneyearner786

AddMe

Bookmark and Share