473,378 Members | 1,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Why does code give bash: syntax error on Linux but runs on Windows?

the given code does not run in linux mint isodara.
on typing
cc pg206[G](c).c

in terminal it gives

bash: syntax error near unexpected token `('

wat to do ........
the above code runs in windows turbo c 3.0

the code is as follows
Expand|Select|Wrap|Line Numbers
  1. #include<stdio.h>
  2.  
  3. void fun(int *,int *);
  4.  
  5. void main()
  6.  
  7. {
  8.  
  9.     int i=5,j=2;
  10.  
  11.     fun(&i,&j);
  12.  
  13.     printf("\n%d %d",i,j);
  14.  
  15. }
  16.  
  17. void fun(int *i,int *j)
  18.  
  19. {
  20.  
  21.     *i=*i**i;
  22.  
  23.     *j=*j**j;
  24.  
  25.  
  26.  
  27. }
Dec 4 '10 #1
1 2206
donbock
2,426 Expert 2GB
You say this code does not run; but the bash error you report is more indicative of a failure during the build process. Is the name of your source file truly pg206[G](c).c ? If so, could you rename the file to get rid of the square brackets and parentheses? I suspect the bash shell believes those characters are commands for it.
Dec 4 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: jacques | last post by:
hello everybody i have a computer with redhat linux. on this computer i have some python scripts i want to run. i don't want to run them with linux but with windows. so i have a second computer...
4
by: John Owens | last post by:
Hi, I'm looking for a plugin for Visual Studio .NET or another IDE etc that would allow me to develop on Windows but have the compiler and debugger and code run on Linux. e.g. Code using...
3
by: WantedToBeDBA | last post by:
Hi friend, I want to do "DB2 UDB V8.1 for Linux, UNIX and Windows Advanced Database Administration(704)" certification. Can i write this exam directly or will have to write preceders such as 701...
6
by: Brian Miller | last post by:
I've been constructing an ASP.Net application using the 1.1 framework, and have been using Web Matrix for development purposes. Now that my application is near completion, I wanted to see if I can...
6
by: leonat | last post by:
I have an asp.net webform. When I view the page in the web browser, the html is returned but not any asp code, i.e., " <% ... %> ". This same code works in the "old" asp page BUT NOT in...
2
by: sheelpatel | last post by:
I am currently using php to output the javascript and was just wondering if my syntax was correct as the code does not seem to work <form action="" method="post" name="myform"> <input...
3
bajajv
by: bajajv | last post by:
Hi, I have linux and windows xp on my machine. I have a 1 GB file on linux. And I want to access it from windows. I tried by mapping but I am able to get only read only access. But I need to copy...
7
by: pltmcs | last post by:
I have a form that keeps track of keys given to employees. We decided to add a feature to keep a digital signature for the keys so I created a second table to hold the signature and enough...
3
by: Levi Campbell | last post by:
Hi, I'm trying to write a program for a friend of mine who uses windows but I use GNU/Linux. I know you can use mingw and link to the python dll, but is there a way to create a win32 service under...
19
by: fx5900 | last post by:
Hi, i am trying to convert an .osm (openstreetmap) file into gml format and finally to shapefile given this wiki info http://wiki.openstreetmap.org/index.php/GML. I'm using windows and when i...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.