Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Write in a file:
void main()
{
int i,j,k,l,list[1000];
FILE *fp;
char any[8];
cout << "Enter a file name\n";
cin >> any;
fp = fopen(any,"wb");
for(j=0;j<50;j++)
for(i=0;i<200;i++)
k = rand() % RAND_MAX;
fwrite(&k,sizeof(int),1,fp);
}
/*fclose(fp);
fp = fopen(any,"rb"); */
i = 0;
while (fread(&l,sizeof(int),1,fp) != 0)
list[i] = l;
i = i + 1;
fclose(fp);
for (i=0;i<50;i++)
cout << list[i] << '\n';
/*for(i=0;i<900;i++)
k = list[i];
fp = fopen("ggg.txt","wb");
for(int a=1;a<900;a++)
int v = list[a];
int b = a;
while(list[b-1] > v)
list[b] = list[b-1];
b = b - 1;
list[b] = v;
for(i=0;i<900;i++)
fclose(fp); */
A company needs 200 pencils per year . you cannot simply use this price as the cost of pencils two years from now. Because of inflation the cost is likely to be higher than it is
Specifying a Class: As discussed a class is defined to develop an algorithm and bind it together in a core shell. A class is an abstract data type (ADT). The binding of dat
I started preparing an alternative cryptocurrency and I am way over my head. I would like help in making modifications to the open source files and then help with deployment. I wil
Does improper inheritance have a potential to wreck a project? Many projects meet a dead end due to bad inheritance. Hence it certainly has potential to wreck a project. Sma
Q: What are User Defined data types? C supports an extraordinary feature known as "type definition" that permits users to define an identifier that would represent an existing
A: This is a name that acts as an alias, or alternative name, for a beforehand defined variable or an object. prepending variable along with "&" symbol makes it as reference. fo
Define Polymorphism? A: Polymorphism let a client to treat di_erent objects in the simialr way even if they were developed from di_erent classes and exhibit di_erent behaviors.
Many modern cryptography algorithms require two numbers that are coprime, or sometimes referred to as relatively prime. Two numbers are coprime if their greatest common divisor is
Define Bit Fields Bit Fields permits the packing of data in a structure. This is particularly useful when memory or data storage is at a premium. Usual examples: Packing
What are P r im a r y D a t a T y p es? Integer can be defined according to the size of the data and it can be modified further by using keyword unsigned and si
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd