Posts
Showing posts from July, 2012
4. Write a program to read a text file “brijesh.txt “ count and display the number of alphanets present in it.
- Get link
- X
- Other Apps
#include <stdio.h> #include <stdlib.h> #include <string.h> #include<conio.h> int main(void) { char str[80]; int l=0; clrscr(); FILE *fp; if((fp = fopen("brijesh.txt", "w"))==NULL) { printf("Cannot open file.\n"); exit(1); } do { printf("Enter a string :\n"); gets(str); l=strlen(str); printf("charecter lenth are\t%d\n",l); strcat(str, "\n"); /* add a newline */ fputs(str, fp); } while(*str!='\n'); return 0; }
6. Write a program to create a text file which contain some text.
- Get link
- X
- Other Apps
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char str[80]; FILE *fp; if((fp = fopen("brijesh.txt", "w"))==NULL) { printf("Cannot open file.\n"); exit(1); } do { printf("Enter a string (CR to quit):\n"); gets(str); strcat(str, "\n"); /* add a newline */ fputs(str, fp); } while(*str!='\n'); return 0; }
C program for conver kilometer into inch ,feet,centimeter and meter
- Get link
- X
- Other Apps
#include<stdio.h> #include<conio.h> void main() { float km,m,cm,ft,inch; clrscr(); printf("enter the distance in kilometres "); scanf("%f",&km); m=km*1000; cm=m*100; C inch=cm/2.54; ft=inch/12; printf(" distance in meters is %f",m); printf(" distance in centimetres is %f",cm); printf(" distance in feet is %f",ft); printf(" distance in inches is %f",inch); getch(); }
C code for Addition of two complex number
- Get link
- X
- Other Apps
#include<stdio.h> #include<conio.h> struct com { int a,b; int x,y; int add1,as; }c; void main() { clrscr(); printf("enter 1st part of comlex number"); scanf("%d%d",&c.a,&c.b); printf("enter imaginary part of number\n"); scanf("%d%d",&c.x,&c.y); printf("Number are=%5d+i%d\n",c.a,c.x); printf("Number are=%5d+i%d",c.b,c.y); c.add1=c.a+c.b; c.as=c.x+c.y; printf("Addition are=%5d+i%d",c.add1,c.as); getch(); }
Program to find handsome number
- Get link
- X
- Other Apps
//handsome Number #include<stdio.h> #include<conio.h> void main() { int num,r,rev=0,r1,sum=0; clrscr(); printf("enter number\t"); scanf("%d",&num); while(num>0) { r=num%10; rev=rev*10+r; num=num/10; } while(rev>9) { r1=rev%10; sum+=r1; rev=rev/10; } if(sum==rev) printf("Handsome number\n"); else printf("Not handsome number"); getch(); }
Find smallest in four number by using Ternery operator
- Get link
- X
- Other Apps
Addition,Substrction ,Multiplication And Compare of two Matrix
- Get link
- X
- Other Apps
//Brijesh #include<stdio.h> #include<conio.h> void main() { int a[100][100],b[100][100],add[100][100],sub[100][100],mul[100][100],r,c; int i,j,flag=0; clrscr(); printf("enter the size of matrix (ROW AND COL)\n"); scanf("%d%d",&r,&c); printf("Enter the element into matrix\n"); for(i=0;i<r;i++) { for(j=0;j<c;j++) { scanf("%d",&a[i][j]); } } printf("Enter the element into 2nd matrix\n"); for(i=0;i<r;i++) { for(j=0;j<c;j++) { scanf("%d",&b[i][j]); } } //for addition for(i=0;i<r;i++) { for(j=0;j<c;j++) { add[i][j]=a[i][j]+b[i][j]; } } printf("Addition\n"); for(i=0;i<r;i++) { for(j=0;j<c;j++) { printf("%5d",add[i][j]); ...
Increase Internet speed
- Get link
- X
- Other Apps
Here i telling you how to increase your internet speed by following some steps: but i dont say it work all OS . step 1 open cmp and go to root and type command "gpedit.msc" and press enter step 2 a window open "local group and policy editor" step 3 now expand the" administrative templete" step 4 then expand the network and then click "Qos packet scheduler "open it and edit the "limit reservable bandwidth . step 5 click enable and set bandwidth. Internet speed