0

Can we save a c programme in .xyz extension..?help plzz and explain how.

answer please

18th Sep 2017, 4:05 AM
White code
White code - avatar
11 Answers
+ 11
Why would you want to save it as a .xyz?
18th Sep 2017, 4:17 AM
Hatsy Rei
Hatsy Rei - avatar
+ 6
You can also compile code into static .lib's...
18th Sep 2017, 4:34 AM
Karl T.
Karl T. - avatar
+ 6
Are you talking about saving the source code .cpp as .xyz or to compile with output .xyz. The second option is probably impossible, especially in Windows, because Windows uses file extension to decide how to treat a file and what to do with it. If you mean to save .cpp as .xyz that's possible, in Windows, although still not recommended, you can introduce a new file type .xyz to open, or compile by creating association with an IDE, in Linux I can't really say, I'm not so familiar with how it works. Hth, cmiiw
18th Sep 2017, 4:52 AM
Ipang
+ 3
Both are possible, but you'll probably have problem running your executable file if its extension is .xyz For that you have to use command line On linux it is gcc, a line like this work : gcc my_code.abc -o my_prog.xyz To execute you then do : ./my_prog.xyz
18th Sep 2017, 5:43 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 1
@karl t. can we save as .xyz extension
18th Sep 2017, 4:37 AM
White code
White code - avatar
0
not enough
18th Sep 2017, 4:14 AM
White code
White code - avatar
0
@hatsy it's a interview questions. asked by interviewer
18th Sep 2017, 4:26 AM
White code
White code - avatar
0
In Linux you can get away with doing this. Linux does not use extensions to tell if file is executable, so you could theory use nearly any extension. (Normally executable files​ have no extension.) For source files you can use any extension, just call the compiler using the terminal. This is useful if want to do something like compile a c source file into a c++ project. The text editor or IDE will not show the Syntax highlighting by default. It's still not recommended to do this.
18th Sep 2017, 6:16 AM
Jared Bird
Jared Bird - avatar
0
You can but you will have problem executing it.
18th Sep 2017, 7:00 AM
Harsh
Harsh - avatar