Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
Member Avatar for muhammad.khan.3576

#include <fstream> #include <iostream> using namespace std; char input_1[256]="1.wmv"; char output_1[256]="2.wmv"; char output_2[256]="3.wmv"; void Append() { ofstream write(output_1,ios::binary|ios::app); ifstream read(output_2,ios::binary); read.seekg(0,ios::end); int size_=read.tellg(); read.seekg(0,ios::beg); char* in=new char[size_]; read.read(in,size_); write.write(in,size_); write.close(); read.close(); } void Split(){ int size_; ifstream read(input_1,ios::in|ios::out|ios::binary); if(read.is_open()) { read.seekg(0,ios::end); size_=read.tellg(); const int half=size_/2; read.seekg(0,ios::beg); char* file_content_a=new char [half]; …

Member Avatar for Ancient Dragon
0
218
Member Avatar for muhammad.khan.3576

#include<string> int str_len( const char * const src) { int len=0; while(src[len]) { len++; } return len; } int str_copy( char * &dest, char * src) // removed (const) to sore the string in dest.By using const,we dont have the // access to store the string.By using ampersand we can …

Member Avatar for Gonbe
0
130
Member Avatar for muhammad.khan.3576

1. You are required to make a structure named “section”. The names of the two sections are secA and secB. 2. There are two members of this structure i.e. numberOfBoys and numberOfGirls. 3. In secA there are 48 boys and 6 girls while in secB there are 50 boys and …

Member Avatar for Ancient Dragon
0
276
Member Avatar for muhammad.khan.3576

How I will multiply this matrix by using for loop ? #include<iostream> using namespace std; void mat_mul_2d(int mat_out_2d[][2], int mat_in1_2d[][2], int mat_in2_2d[][2]) { mat_out_2d[0][0]=mat_in1_2d[0][0]*mat_in2_2d[0][0]+mat_in1_2d[0][1]*mat_in2_2d[1][0]; mat_out_2d[1][1]=mat_in1_2d[0][0]*mat_in2_2d[0][1]+mat_in1_2d[0][1]*mat_in2_2d[1][1]; mat_out_2d[2][2]=mat_in1_2d[1][0]*mat_in2_2d[0][0]+mat_in1_2d[1][1]*mat_in2_2d[1][0]; mat_out_2d[3][3]=mat_in1_2d[1][0]*mat_in2_2d[0][1]+mat_in1_2d[1][1]*mat_in2_2d[1][1]; } int main() { int mat_in1_2d[2][2] = {{1, 2},{3, 4}}; / int mat_in2_2d[2][2]={{1,0},{0,1}}; int mat_out_2d[2][2]={{0},{0}}; mat_mul_2d(mat_out_2d,mat_in1_2d,mat_in2_2d); return 0; }

Member Avatar for muhammad.khan.3576
0
279
Member Avatar for muhammad.khan.3576

// i dont know where i am getting wrong..the answer is contniously zero...plz help me #include<iostream> #include<cstdlib> using namespace std; int rand_val() { return rand()%1000000+10000; } int main() { int i,j; int salary_vec[100]={}; for( i=0;i<100;i++) { salary_vec[j]=rand_val(); } double tax_vec[100]={}; for( j=0;j<100;j++) { if(salary_vec[i]>=70000) { tax_vec[j]=salary_vec[i]*(10/100); } else if((salary_vec[i]>=50000)&&(salary_vec[i]<70000)) { …

Member Avatar for muhammad.khan.3576
0
193