string line = "1" + " 2 " ; Process p = new Process(); p.StartInfo.CreateNoWindow = true; p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; p.StartInfo.FileName = "C:\\..\\demo1.exe"; p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardInput = true; p.Start(); p.StandardInput.WriteLine(line); p.Close();
#include<stdio.h> int main() { int a, b, c; printf("Enter two numbers to add\n"); scanf("%d%d",&a,&b); c = a + b; printf("Sum of entered numbers = %d\n",c); return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)