4th c++ Problem

Manish Goyal

Manish Goyal

@manish-r2Hoep Oct 24, 2024
Look the code
#include<iostream.h>
#include<conio.h>
int main()
{
char a[10]="Hello";
cout<<str;
return 0;
}
I want address of string....but without use & operator
Good luck

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Jan 3, 2010

    hey what happened ceans?
    I don't think that this question is that much tough....you have to use just 5 letters ..
  • gaurav.bhorkar

    gaurav.bhorkar

    @gauravbhorkar-Pf9kZD Jan 3, 2010

    You have to cast the 'str' to a void pointer.

    ie.

    cout << (void *) a ;
  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Jan 4, 2010

    Bingo
    Gaurav..You are right!!!!!!!
  • gaurav.bhorkar

    gaurav.bhorkar

    @gauravbhorkar-Pf9kZD Jan 4, 2010

    goyal420
    Bingo
    Gaurav..You are right!!!!!!!
    Looking forward to answer some more questions.
  • Hussanal Faroke

    Hussanal Faroke

    @hussanal-faroke-U5nNM8 Jan 4, 2010

    gaurav is right!!!