c 2b 2b convert to assembly language

Solutions on MaxInterview for c 2b 2b convert to assembly language by the best coders in the world

showing results for - "c 2b 2b convert to assembly language"
Giulio
21 May 2020
1$ gcc -S geeks.c
2
Igor
08 Oct 2016
1int main(){
2  printf("Hello World");
3 return 0; 
4}
Sol
23 Jan 2020
1
2 
3#include<iostream>
4#include<fstream>
5using namespace std;
6 
7struct mail
8{
9    char un[50];             // user name
10    char pd[50];             // passsword
11    void reg(int);
12} obj[5];
13 
14void mail::reg(int k)
15{
16    int i=k;
17    cout<<"\nEnter user name :: ";
18    cin>>un;
19    cout<<"\nEnter password :: ";
20    cin>>pd;
21 
22    ofstream filout;
23    filout.open("C:\\Users\\acer\\Documents\\registration.txt",ios::app|ios::binary);
24    if(!filout)
25    {
26        cout<<"\nCannot open file\n";
27    }
28    else
29    {
30        cout<<"\n";
31        filout.write((char *)&obj[i],sizeof(mail));
32        filout.close();
33    }
34 
35    cout<<"\n...........You are now registered.......... \n\n";
36 
37}   // end of sign up or register func
38 
39int main()
40{
41    int t;
42    cout<<"\nEnter Registration Details for User 1 :: \n";
43    obj[0].reg(0);
44    cout<<"\nEnter Registration Details for User 2 :: \n";
45    obj[1].reg(1);
46    cout<<"\nEnter Registration Details for User 3 :: \n";
47    obj[2].reg(2);
48 
49    mail obj2;
50 
51    ifstream filein;
52    filein.open("C:\\Users\\acer\\Documents\\registration.txt",ios::in|ios::binary);
53    if(!filein)
54    {
55        cout<<"\nUnable to open file to read\n";
56    }
57    else
58    {
59        cout<<"\nRegistered Details of All Users :: \n";
60        filein.read((char *)&obj2,sizeof(obj2));
61        while(filein)
62        {
63            cout<<"\nUsername :: "<<obj2.un<<"\nPasswword :: "<<obj2.pd<<"\n";
64            filein.read((char *)&obj2,sizeof(obj2));
65        }
66            //filein.close();
67    }
68        return 0;
69}
70
Gage
31 Feb 2019
1for(int i=0; i<100; i++)
2cout<<i<<endl;
Maximilien
06 Jul 2016
1 
2#include<iostream>
3#include<fstream>
4using namespace std;
5 
6struct mail
7{
8    char un[50];             // user name
9    char pd[50];             // passsword
10    void reg(int);
11} obj[5];
12 
13void mail::reg(int k)
14{
15    int i=k;
16    cout<<"\nEnter user name :: ";
17    cin>>un;
18    cout<<"\nEnter password :: ";
19    cin>>pd;
20 
21    ofstream filout;
22    filout.open("C:\\Users\\acer\\Documents\\registration.txt",ios::app|ios::binary);
23    if(!filout)
24    {
25        cout<<"\nCannot open file\n";
26    }
27    else
28    {
29        cout<<"\n";
30        filout.write((char *)&obj[i],sizeof(mail));
31        filout.close();
32    }
33 
34    cout<<"\n...........You are now registered.......... \n\n";
35 
36}   // end of sign up or register func
37 
38int main()
39{
40    int t;
41    cout<<"\nEnter Registration Details for User 1 :: \n";
42    obj[0].reg(0);
43    cout<<"\nEnter Registration Details for User 2 :: \n";
44    obj[1].reg(1);
45    cout<<"\nEnter Registration Details for User 3 :: \n";
46    obj[2].reg(2);
47 
48    mail obj2;
49 
50    ifstream filein;
51    filein.open("C:\\Users\\acer\\Documents\\registration.txt",ios::in|ios::binary);
52    if(!filein)
53    {
54        cout<<"\nUnable to open file to read\n";
55    }
56    else
57    {
58        cout<<"\nRegistered Details of All Users :: \n";
59        filein.read((char *)&obj2,sizeof(obj2));
60        while(filein)
61        {
62            cout<<"\nUsername :: "<<obj2.un<<"\nPasswword :: "<<obj2.pd<<"\n";
63            filein.read((char *)&obj2,sizeof(obj2));
64        }
65            //filein.close();
66    }
67        return 0;
68}
69} 
70