Program to generate 5 Random nos. between 1 to 100. Get link Facebook X Pinterest Email Other Apps January 08, 2015 Source code class RandomDemo{ public static void main(String args[]){ for(int i=1;i<=5;i++){ System.out.println((int)(Math.random()*100)); } } } Get link Facebook X Pinterest Email Other Apps Comments
8086 STRING MANIPULATION –FIND AND REPLACE A WORD May 03, 2016 ASSUME CS: CODE, DS: DATA DATA SEGMENT LIST DW 53H, 15H, 19H, 02H REPLACE EQU 30H COUNT EQU 05H DATA ENDS CODE SEGMENT START: MOV AX, DATA MOV DS, AX MOV AX, 15H MOV SI, OFFSET LIST MOV CX, COUNT MOV AX, 00 ... Read more
C Program to find the size of structure without using sizeof operator. May 23, 2014 source code: #include<stdio.h> struct student { int roll; char name[100]; float marks; }; int main() { struct student *ptr = 0; ptr++; printf("Size of the structure student: %d",ptr); getch(); return 0; } Read more
C program to copy a data of file to other file. June 19, 2014 source code #include<stdio.h> int main() { FILE *p,*q; char file1[20],file2[20]; char ch; printf("\nEnter the source file name to be copied:"); gets(file1); p=fopen(file1,"r"); if(p==NULL){ printf("cannot open %s",file1); exit(0); } printf("\nEnter the destination file name:"); gets(file2); q=fopen(file2,"w"); if(q==NULL){ printf("cannot open %s",file2); exit(0); } while((ch=getc(p))!=EOF) putc(ch,q); printf("\nCOMPLETED"); fclose(p); fclose(q); getch(); return 0; Read more
Comments
Post a Comment