Search Results

Search: Posts Made By: manoj.rana
8,561
Posted By manoj.rana
Env set
Hi,
what you want to achive is i think you can run the script in the following manner
. script_name
<DOT><SPACE><script_Name>
thise run the script in the current shell
and if you run the script ...
Forum: Programming 04-29-2007
3,300
Posted By manoj.rana
socket error
Hi,
apart from the previous solutions given to u.
one thing i want to add if u are still facing some error
then please use these options at the time of compilations
-lnsl -lsocket -lresolv and i...
11,858
Posted By manoj.rana
. .profile
Hi,
execute . .profile chk there is no execute permission on .profile
we want to set these environment values
u can manually set those values like
export ENV_VAR=ORACLE_HOME
but i think whn u...
Forum: Programming 04-19-2007
3,463
Posted By manoj.rana
client problem
#include <stdio.h>

/* no need to give comment for this headerif anyone doesn't know abt stdio.h he/she should not programming in C*/

#include <stdlib.h>
#include <sys/types.h> /* standard...
Forum: Programming 04-18-2007
3,463
Posted By manoj.rana
socket error
Hi dear ,
checked your program..
upto me it is working fine on linux machine.
but for next i want to suggest one more thing ..
just show us the type of errors u r facing.
that will be easy to...
Forum: Programming 04-13-2007
4,800
Posted By manoj.rana
Makefile
I think. if u don't have binary on linux or solaris then u r makefile must execute
and generate a binary for that machine.
Forum: Programming 04-12-2007
10,949
Posted By manoj.rana
ternary operator
fn_max(var_type a,var_type b,var_type c)
{
var_type t;
return(t=((t>a?:t;a)>b)?:t;b)>c?:t;c)
}

break the above expresiion as follows.
1. (t>a?:t;a)
2. ((result)>b)?:t;b)
3. result>c?:t;c
56,742
Posted By manoj.rana
print and echo
both echo and print are common in working ...
both displays the chars on the screen or windows.
upto me using print we can redirect the output to any file descriptor
using print -u[n] but for...
Forum: Programming 04-11-2007
4,231
Posted By manoj.rana
struct size
Hi ,
the solution given above is right but i want to correct at one point.
c = b - (unsigned int )sizeof(struct a);
printf("%d\n",c); will print -2 because any struct occupy the memory in chunk of...
Forum: Programming 04-09-2007
108,579
Posted By manoj.rana
Linux command by C programm
Hi,
I think u can also call Linux commands using the exec family functions.
for that u need to read IPC programming in C.
Forum: Programming 04-09-2007
2,813
Posted By manoj.rana
Main Resursive
Hi
i think it's possible but its in differnt way.
i am sendin u code just chk it.

int main()
{
static int i = 0;
if(++i == 5)
{
printf("Exiting...\n");
exit(0);
}
else
{...
Forum: Programming 04-05-2007
3,481
Posted By manoj.rana
How to write a code in C to search a file
Hi ,
The code for displaying the files in a directory is already posted on this
forum. you need to just change that according to your requirement. i have given the code in How to write a code in C...
Forum: Programming 03-29-2007
8,801
Posted By manoj.rana
"-lstdc++" mean
"-lstdc++" is a c++ libraray to be linked with gcc .
Forum: IP Networking 03-28-2007
8,793
Posted By manoj.rana
i think u can use ping utility
ping -c2 ip_address
and check the status of the ping command by echo $?
if 0 echoed then server is alive otherwise server is down

rest u can check man ping
Forum: Programming 03-27-2007
45,062
Posted By manoj.rana
C Code to search a file in directory you can modify it for a perticular path
#include <dirent.h>
#include <stdio.h>
#include <string.h>

int main(int argc, char *argv[])
{
DIR *dp;
struct dirent *dirp;

if (argc != 3)
{
...
Forum: Programming 03-27-2007
8,801
Posted By manoj.rana
c++ compilation
Hi,
U can also compile c++ programs with gcc
i am giving an example which need one library to be linked
gcc xyz.cpp -lstdc++
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 12:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy