Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8163339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:59:59+00:00 2026-06-06T18:59:59+00:00

I have the following problem #include <iostream> #include <stdio.h> #include <string.h> int main (){

  • 0

I have the following problem

#include <iostream>
#include <stdio.h>
#include <string.h>

int main (){
   string data = "\xd7\x91\xd7\x90" ; 

   data << data<<endl;
}

The output is: בא

But with an input.

#include <iostream>
#include <stdio.h>
#include <string.h>

int main (){
    char rrr[100];
    cout << "Please enter your string:" ;   
    scanf("%s",rrr);

    cout<< rrr <<endl;
}    

The input I type is: \xd7\x91\xd7\x90

The output I see on the screen is: \xd7\x91\xd7\x90

So my question is how can I convert the input \xd7\x91\xd7\x90 to בא?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:00:00+00:00Added an answer on June 6, 2026 at 7:00 pm

    You can change your scanf statement:

    int a, b, c, d;
    if (scanf("\\x%x\\x%x\\x%x\\x%x", &a, &b, &c, &d) == 4)
        // a, b, & c have been read/parsed successfully...
        std::cout << (char)a << (char)b << (char)c << (char)d << '\n';
    

    Still, it’s better to learn to stream in hex values ala:

    char backslash, x;
    char c;
    
    while (std::cin >> backslash >> x >> std::hex >> c && backslash == '\\' && x == 'x')
        // or "for (int i = 0; i < 4 && std::cin >> ...; ++i)" if you only want four
        std::cout << c;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with the following code: #include <stdio.h> #include <iostream> int main
I have following code: #include <iostream> using namespace std; template<class T> T max(T *data,int
I have the following code: #include <iostream> #include Student.h <-- fixed the problem #include
i have following code in c++ #include <iostream> using namespace std; void qsort5(int a[],int
I have the following problem: #include <vector> #include <iostream> using namespace std; class Mat
The problem I have is illustrated in the following code. #include <iostream> #define X
I have following structure. #include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector>
i have following code for heapsort #include <iostream> using namespace std; void exch(int a[],int
I have slimmed my problem down to the following code: #include <iostream> using namespace
I have the following code #include <iostream> #include <cstddef> #include <string> #include <memory> class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.