Posts
 
Reputation
Joined
Last Seen
Ranked #630
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #2K
~5K People Reached
Favorite Forums
Member Avatar for herms14

[code=c] 1. /* struct sockaddr *to_cast = (struct sockaddr *)serv_addr; */ 2. if (connect(sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr))) < 0) [/code]

Member Avatar for getlogesh
0
999
Member Avatar for red999

What's the purpose of using three consecutive fgets? (line 55, 56 and 58) Buffer s always contains the contents read by third fgets so can you tell how data is organised in your file.

Member Avatar for red999
0
119
Member Avatar for vladdy191
Member Avatar for shahanakazi

[code=c++] void drawshape(int row) { int i; for (i=1; i < row; i++) cout<<setw(i+1)<<'#'<<setw(row*2-i*2)<<' '<<'#'<<endl; cout<<setw(i+1)<<'#'<<endl; } [/code]

Member Avatar for Barefootsanders
0
159
Member Avatar for jralexander137

At line 12 you are working on one byte, means interchanging last 2 nibbles. so after line 12 executes x becomes 0x00000040. X has lost its original value. You cannot operate on x in two statements. This can be done if you take other variable. But for x you need …

Member Avatar for codeguru_2009
0
236
Member Avatar for 2ndmiltia

In your code once you read the account number, for loop iterates for 1000 times. For the very first read array is filled with accnum (assuming you have initialised array to zero). You must use break statement as soon as an empty slot is filled.

Member Avatar for NathanOliver
0
286
Member Avatar for VernonDozier

Read the file line by line into a buffer, use strtok_r on each subsequent line. Also be careful strtok function modifies the strings passed to it.

Member Avatar for VernonDozier
0
241
Member Avatar for vileoxidation
Member Avatar for mrman208

Did you check the permission of the directories in which you are creating a new directory.

Member Avatar for codeguru_2009
-1
170
Member Avatar for MrNoob

Its not always. The deciding factor is machine type(32bit or 64bit). So for 32 bit machine boundary condition is double word and for 64bit machine it's quad word. Address calculation by processor is easy if words are stored at boundary and hence minimum number of cycles required to fetch the …

Member Avatar for codeguru_2009
0
143
Member Avatar for sftwr21

[QUOTE][code=c] break;[/code] [/QUOTE] always puts the control out of immediate loop in which it is declared. In your case it will come out of the second for loop not the first one.

Member Avatar for sftwr21
0
212
Member Avatar for Gaiety

Considering ascii data, fwrite will write sizeof(num) characters to the standard ouput. Characters order depends on machine type - little endian or big endian.

Member Avatar for codeguru_2009
0
1K
Member Avatar for jhunluis

If arrays has been not taught in the class why you want to use it? If you really want to learn something, then work on it. Guys here are ready to help you but first you must help yourself.

Member Avatar for Salem
0
164
Member Avatar for suutukil

Additionally, once you get the sum of the numbers, perform any sorting technique(bubble sort, selection sort, etc.) on it.

Member Avatar for mrnutty
-1
152
Member Avatar for splurchner

pls reconsider your while loop. its a infinite loop. 'n' never changes so 'count' gets continuous increment. hence 'ans[count]' gives segfault.

Member Avatar for splurchner
0
189
Member Avatar for codeguru_2009

i've copied this code from net but this is not working. Only blank output. can anyone help. i'm new to assembly. [code][ORG 7C00h] ; This is where BIOS put me ; --------------------------------------------------------- ; Main program ; --------------------------------------------------------- mov si, msg ; Print message call putstr hang: jmp hang ; Hang! …

Member Avatar for NotNull
0
172
Member Avatar for cristian.sorin

When a file is created in linux, a inode number is assigned to it and name of a file is link to that inode number. using this link we can perform any operations on the chosen file. Now when you open a file, kernel increments the reference count of that …

Member Avatar for codeguru_2009
0
147
Member Avatar for chixm8_49

Answers 1) take array of `int catg[4] = {0, 0, 0, 0}` now once a category is chosen set that array index. suppose catg 1 is chosen then `catg[0] = 1;` insert code to test if catg is set, yes break if (categoryno == 1) { if( catg[0]) { printf("choose …

Member Avatar for codeguru_2009
0
175
Member Avatar for furqankhyraj

you are expecting function max to return maximum value but its return type is void.

Member Avatar for yellowSnow
-2
90