Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
67% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #3K
~7K People Reached
Favorite Tags
c x 12

17 Posted Topics

Member Avatar for jai_steave

This code snippet is from stanford library. It's elegant and simple. Some parts get tricky, it's better to have a drawing to understand it better. void RecursiveReverse(struct node** headRef) { struct node* first; struct node* rest; if (*headRef == NULL) return; // empty list base case first = *headRef; // …

Member Avatar for deceptikon
0
444
Member Avatar for hassje

I guess this should help. #include <stdio.h> #include<string.h> struct student { int* ptr[23]; char* name[12];//store address of character string }s1; int main(void) { int roll=20; s1.ptr[0]=&roll; s1.name[0]="zahid ali"; printf("roll no of student :%d\n",*(s1.ptr[0])); printf("name of student:%s\n",s1.name[0]); return 0; }

Member Avatar for rustysynate
0
162
Member Avatar for Stpdoug

The problem is with the argument passing methods. Before the discussing the solution to this issue, we shall see the concepts a bit. There are two types of passing arguments to the function. * Pass by Value * Pass by Reference In the pass by value, only the values are …

Member Avatar for Stpdoug
0
210
Member Avatar for dalaharp

In case you are using GNU Linux use **time** command in the shell. This utility will give the time taken from the invocation to the end of the program. The output will be something like this $time a.out real 0m0.255s user 0m0.130s sys 0m0.030s

Member Avatar for rustysynate
0
3K
Member Avatar for terabyte

They both are same functionally eventhough the syntax is different. The compiler decay's **function(int x[])** into **function(int *x)** When you are passing an array to a function, you are implicity passing the address of it invariably. There is no pass by value when it comes to a function with array …

Member Avatar for deceptikon
0
166
Member Avatar for AzizTitu

Yes, it is possible but it is not recommended. Consider the following program. #include <stdio.h> int main() { int n=10; int i; int a[n]; for (i=0;i<10;i++) { a[i]=i; } printf ("%d", a[5]); return 0; } It will produce the desired result which is 5. NOTE: The value of n should …

Member Avatar for deceptikon
0
242
Member Avatar for NMADW

Do a cat of /proc/cpuinfo. If you could see "lm" in the flags, then your CPU is 64 bit. lm stands for long mode.

Member Avatar for rubberman
0
207
Member Avatar for ram619

> id=shmget(111,ps*3,IPC_CREAT|06666); I haven't used this flag 06666 before, but when i tried with 666 option it worked. Unless otherwise you have special purpose using this flag you can switch to this ubiquitous mode (0666). > if(id<0 && errno !=EEXIST) This condition will only pass when the id is -1 …

Member Avatar for ram619
0
431
Member Avatar for Gaiety

I guess the shared library symbol table is getting loaded. Try the below command in gdb, before running the program. ***show auto-solib-add*** -- this will indicate the current status. Incase if this mode is ON, turn it OFF using the command **set auto-solib-add mode off** Hope it helps :)

Member Avatar for Gaiety
0
1K
Member Avatar for hust921

I guess you might be interested in "**getopt**" API provided by Linux. It allows to get reterive various options from command line. See the man page for more info.

Member Avatar for hust921
0
233
Member Avatar for ashleytauari

The argument to the function log is just "log-$date.log". So only that will go to the log file. Try "ls -l (SOURCE DIRECTORY)" as the argument to the log function. NOTE: Use the -r option to append the files into the tar archive. Using -c option will create new archive …

Member Avatar for CGSMCMLXXV
0
184
Member Avatar for viplovdeep

viplovdeep: If you are able to connect with LAN but unable to ping to Interent, then there might be a problem with the DNS. (It needs to resolve the IP with the Hostname) Check whether you have the same DNS Server IP in laptop and PC. Else use the OpenDNS. …

Member Avatar for rustysynate
0
231
Member Avatar for avidwan
Member Avatar for rustysynate
0
275
Member Avatar for rustysynate

Hi, I searched the net about this question and could figure out exactly the answer to this. They say that CIDR will probably increase the efficiency of the router. If someone could enlighten me on this, it would be a great help to me.

Member Avatar for orwell84
0
119
Member Avatar for rustysynate

I tried the first post on wxpython by fuse. The code is as follows # import wx # # always add this line, or your code won't compile - the wx module contains the GUI code you'll use # """The start of our wxPython GUI tutorial""" # # app = …

Member Avatar for rustysynate
0
175
Member Avatar for rustysynate

Hi, I am trying to build a rectangle which changes its size with respect to the input given. My problem is that on using the[B] surface.blit[/B] function the object start to replicate when the size of the screen is greater than the object. So many rectangle appear instead of one. …

Member Avatar for rustysynate
0
155
Member Avatar for rustysynate

Hi, I am new to programming with python. I want to make a image rotate dynamically corresponding to the CPU usage in ubuntu. I searched everywhere but couldnot find any post for it.All i have found is a static rotation with the PIL. If anyone could help me in this …

Member Avatar for rustysynate
0
88

The End.