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 9064503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:16:13+00:00 2026-06-16T16:16:13+00:00

I have a simple program test which gets a number as input and prints

  • 0

I have a simple program test which gets a number as input and prints the same on console.

#include<stdio.h>
int main(void)
{
   int i;
   printf("Test Pgm \n");
   printf("Enter a no:");
   scanf("%d",&i);
   printf("No Inputted:%d \n",i);
   return 0;
}

//The above program lies on 10.220.5.xx (different machine)

##gcc -o test test.c

On invoking the test pgm frm another machine over ssh , I don’t get any prompt on the machine where im executing.

$ ssh user@10.220.3.xx '/home/user/test'
user@10.220.3.xx's password

After entering the password i don’t get see anything not even ‘Test Pgm’. How do i get the prompt remotely and input the values?

  • 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-16T16:16:14+00:00Added an answer on June 16, 2026 at 4:16 pm

    Try adding fflush(stdout); before the scanf().

    Also, you must check the return value of scanf(), it can fail to convert the input if given non-numerical text:

    fflush(stdout);
    if(scanf("%d", &i) == 1)
      printf("Number input: %d\n", i);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple test program, running on Solaris 5.8: #include <stdio.h> #include
I have a simple C++ program: #include <iostream> int main() { std::cout << "Hello\n";
I have this following simple program: int main() { char* v = getenv(TEST_VAR); cout
I have a simple test program which is designed to consume the Apache Felix
I have a simple test program (error checks removed): #include <iostream> #include <iomanip> #include
I have a simple RabbitMQ test program randomly enqueuing messages, and another reading them,
Say I have simple program that emulates a board game with a number of
I have a simple program (written in Java) which uses the google protocol buffer
I have a simple program which is able to change the background color after
I have a simple program which I have compiled in both MinGW and Visual

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.