Webhosting in Pakistan
Results 1 to 12 of 12

Thread: bhai plz is code ko explain kr de koi

  1. #1
    barribehn's Avatar
    barribehn is offline Senior Member+
    Last Online
    12th January 2018 @ 01:18 PM
    Join Date
    06 Mar 2010
    Gender
    Male
    Posts
    311
    Threads
    86
    Credits
    294
    Thanked
    20

    Unhappy bhai plz is code ko explain kr de koi

    Webhosting in Pakistan


    yar plz isko explain kr do kal teacher se daant pare gi raat tk isko plz explain kr do bahi iski hr line one by one explain kejay ga


    sorting of array using pointer in c


    #include "stdafx.h"
    #include<iostream>
    using namespace std;

    void main()
    {
    int i,j,temp1,temp2;
    int arr[10]={0,2,3,6,5,4,8,9,1,7};
    int *ptr;
    for(i=0;i<9;i++)

    {

    for(j=0;j<9-i;j++)

    {

    if(*(arr+j)>*(arr+j+1))
    {
    ptr=arr+j;
    temp1=*ptr++;
    temp2=*ptr;
    *ptr--=temp1;
    *ptr=temp2;
    }
    }
    }

    for(i=0;i<10;i++)


    cout<<arr[i];

    }

  2. #2
    rafiibrahim is offline Senior Member+
    Last Online
    7th August 2013 @ 07:48 AM
    Join Date
    07 Oct 2011
    Location
    New south wale
    Age
    30
    Gender
    Male
    Posts
    148
    Threads
    13
    Credits
    0
    Thanked
    9

    Default

    woooooooooooooooooow! are you crazy! How can anybody expalin the bunch of code ?........it's impossible dude.......though i am not lazy to tell you the result of this code ......................

  3. #3
    rafiibrahim is offline Senior Member+
    Last Online
    7th August 2013 @ 07:48 AM
    Join Date
    07 Oct 2011
    Location
    New south wale
    Age
    30
    Gender
    Male
    Posts
    148
    Threads
    13
    Credits
    0
    Thanked
    9

    Default

    Ek code ko explain kar ne ke liye mujhe .......short mein expalin karna chahoonga.........meri urdu weak /poor hai to please mujhe maafh kare........

  4. #4
    waqasahmad1's Avatar
    waqasahmad1 is offline Advance Member
    Last Online
    12th June 2019 @ 03:48 PM
    Join Date
    27 Nov 2010
    Location
    Lahore
    Gender
    Male
    Posts
    8,021
    Threads
    280
    Credits
    60
    Thanked
    599

    Default


  5. #5
    barribehn's Avatar
    barribehn is offline Senior Member+
    Last Online
    12th January 2018 @ 01:18 PM
    Join Date
    06 Mar 2010
    Gender
    Male
    Posts
    311
    Threads
    86
    Credits
    294
    Thanked
    20

    Default

    Quote rafiibrahim said: View Post
    woooooooooooooooooow! are you crazy! How can anybody expalin the bunch of code ?........it's impossible dude.......though i am not lazy to tell you the result of this code ......................
    bhai meine c++ expert se pocha hai if u not know c++ then bye bye

  6. #6
    barribehn's Avatar
    barribehn is offline Senior Member+
    Last Online
    12th January 2018 @ 01:18 PM
    Join Date
    06 Mar 2010
    Gender
    Male
    Posts
    311
    Threads
    86
    Credits
    294
    Thanked
    20

    Default

    Quote rafiibrahim said: View Post
    Ek code ko explain kar ne ke liye mujhe .......short mein expalin karna chahoonga.........meri urdu weak /poor hai to please mujhe maafh kare........
    plz ap kar dein explain

  7. #7
    rafiibrahim is offline Senior Member+
    Last Online
    7th August 2013 @ 07:48 AM
    Join Date
    07 Oct 2011
    Location
    New south wale
    Age
    30
    Gender
    Male
    Posts
    148
    Threads
    13
    Credits
    0
    Thanked
    9

    Default

    Quote barribehn said: View Post
    plz ap kar dein explain
    ok i'll try .........but in brief

  8. #8
    rafiibrahim is offline Senior Member+
    Last Online
    7th August 2013 @ 07:48 AM
    Join Date
    07 Oct 2011
    Location
    New south wale
    Age
    30
    Gender
    Male
    Posts
    148
    Threads
    13
    Credits
    0
    Thanked
    9

    Default

    stdafx.h".......this a just standard header directive name " you can put your name too there but before doing this you have to do a bit of work to set you name in main standard libarary to get it work..so....stdafx.h...using precompiled headers can dramatically speed up your build times..mean can compile fast................

  9. #9
    rafiibrahim is offline Senior Member+
    Last Online
    7th August 2013 @ 07:48 AM
    Join Date
    07 Oct 2011
    Location
    New south wale
    Age
    30
    Gender
    Male
    Posts
    148
    Threads
    13
    Credits
    0
    Thanked
    9

    Default

    void main() main is a function , void means it returns nothing, when the function completed it task, it goes blank.....int : means integers " next important line is int main(). This line tells the compiler that there is a function named main, and that the function returns an integer,........whereas pointer is " Ponters are variables which refer to the memory locations of other variables "

  10. #10
    rafiibrahim is offline Senior Member+
    Last Online
    7th August 2013 @ 07:48 AM
    Join Date
    07 Oct 2011
    Location
    New south wale
    Age
    30
    Gender
    Male
    Posts
    148
    Threads
    13
    Credits
    0
    Thanked
    9

    Default

    if you aren't a programmer you can even exactlyd understand a bit what i am saying you.....?.........to please aap tutorial lelo .....mujhe standard code ke bare main aap ko boolton.......ok........1) if statement use kare jata " jub hi tab statement jo aap provide kare wo " true hai ya false hai " like " if x==amir display full amir name , if x==salman display full salman name....just an example .......only if true do this if not do that ....." simple "........

  11. #11
    rafiibrahim is offline Senior Member+
    Last Online
    7th August 2013 @ 07:48 AM
    Join Date
    07 Oct 2011
    Location
    New south wale
    Age
    30
    Gender
    Male
    Posts
    148
    Threads
    13
    Credits
    0
    Thanked
    9

    Default

    int =integer ........which have name to specify with value so that the the compiler can find what you're searching for ......like int = amir

  12. #12
    barribehn's Avatar
    barribehn is offline Senior Member+
    Last Online
    12th January 2018 @ 01:18 PM
    Join Date
    06 Mar 2010
    Gender
    Male
    Posts
    311
    Threads
    86
    Credits
    294
    Thanked
    20

    Default

    Webhosting in Pakistan
    Quote rafiibrahim said: View Post
    int =integer ........which have name to specify with value so that the the compiler can find what you're searching for ......like int = amir
    bhai mein oop aur c++ parh chuka hu ap yh btayen k yh pointer kese work karein gay is program mein plz

Similar Threads

  1. bhai yar koi hai jo nokia 1209 ki tips aur securty code reset krnay ka bta sakay ?
    By adnanch74 in forum Mobile phones problems and Help Zone
    Replies: 1
    Last Post: 28th November 2011, 10:33 PM
  2. Bhai Country Code Lag gya hai plz help me
    By avatar in forum Mobile phones problems and Help Zone
    Replies: 2
    Last Post: 3rd July 2010, 01:17 PM
  3. bhai Rana Yaser smart movie ka code snd kar do plzzzzzz
    By goalguy in forum Mobile phones problems and Help Zone
    Replies: 41
    Last Post: 3rd February 2010, 11:52 AM
  4. Replies: 2
    Last Post: 17th January 2009, 11:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •