31 Discussion / Question Topics

Remove Filter
Member Avatar for MrNoob

hi, I have some problems with winsock library so I am calling loading it dynmically then calling the functions so far so good,but the problem is for example I see in the winsock2 header files that - GetHostByName and some other functions are which I use there prototypes is kinda …

Member Avatar for UncleLeroy
0
98
Member Avatar for MrNoob

oke I was coding some stuff involving 2d array allocating i normally know how to do it in main coz you don't need to pass adr main ptr that get's allocated but when i made it i got somewhat confused I don't know why it went wrong [code] #include <stdio.h> …

Member Avatar for MrNoob
0
116
Member Avatar for MrNoob

hey i got something again i got confused by in PE files and they don't rlly explain why happens oke so what im confused with FileAlignment and SectionAlignment files must be aligned or sections to whatever count is right ? like if the it's less than the number (x) then …

Member Avatar for MrNoob
0
105
Member Avatar for MrNoob

I got problem with this function for adding icon to a program with small programs it corupts it and with bigger programs it doesn't even do anything [code] #include <stdio.h> #include <windows.h> #define MIN 2 char *ReadFile(char *SzFile,int *BytesCount) { int fSize; FILE *pFile; char *Buffer; if(!(pFile=fopen(SzFile,"rb"))) return NULL; fseek(pFile,0,SEEK_END); …

0
68
Member Avatar for MrNoob

hey i was reading some stuff about windows i was wondering if file is loaded at virtual memory and let's say we load many files at once wouldn't that cause thrashing ? or exucatables are loaded into RAM then copied to virtual memory of hdd ?

Member Avatar for MrNoob
0
158
Member Avatar for MrNoob

hey i m reading about pe format but there something that i don't get RVA in documentation it says it just like a temp for addressing memory in other sections ok and it's just a DWORD what if there are many temperoralily variables wouldnt that overflow the that RVA value …

Member Avatar for MrNoob
0
479
Member Avatar for MrNoob

hi i m sorry for this noob question but there something i don't get i was reading abt File format like PE for example i was wondering how is C unverisal on MAC win and unix since they use diffrent file format does C takes care of each file format …

Member Avatar for MrNoob
0
317
Member Avatar for MrNoob

hey i m here supposed to extend calculator of K&R to support getline i made it but i dunno everytime i keep getting 0 poped not the numbers itself i debuged it i couldn't find where the bug is so hopefully someone will tell me what i m doing wrong …

Member Avatar for MrNoob
0
165
Member Avatar for MrNoob

Hello here in k&r excerise of primitive calculator i get it and all but there something i think its weird and i don't somewhat get it here the getch and ungetch functions i don't get it's routine [code] #include <stdio.h> #include <stdlib.h> /* for atof() */ #include <ctype.h> #define MAXOP …

Member Avatar for MrNoob
0
314
Member Avatar for MrNoob

well bascially here i started with K&R excerises with remove tabes and spaces i m not sure why my programs works in my head it does but even in puesdo code i did it does but arr[j] sometimes get intilised to values before [code] #include <stdio.h> #include <ctype.h> #define STOP …

Member Avatar for dkalita
-1
99
Member Avatar for MrNoob

hello i was reading today some stuff abt bitfield but here in this program I understand most of it but there unnamed fields inside the structure book says its stuff for allgiment or something like that i dont rlly get what does it do [code] /* fields.c -- define and …

Member Avatar for codeguru_2009
0
145
Member Avatar for MrNoob

I m trying to find idea to change like from 1 to one and 2 to two and 3 three from 1 to 999 i m had an idea to do like a string with information etc ? but i want better idea so i dunno how to do it …

Member Avatar for Anjoe18_Edica
0
225
Member Avatar for MrNoob

hello i m suppose to do this program which should pass array of ptrs to a structure intilise and put student[i] info in each array i did most of it but now i got problem coz i cant just pass address of structure since its an array of ptrs to …

Member Avatar for MrNoob
0
152
Member Avatar for MrNoob

hello i m doing some function for saving a structure of some employee to text but i want to do it using ptrs to struct normally i tried first using ptr to struct in some main function to test some stuff abt it but i get runtime error [code] #include …

Member Avatar for yellowSnow
0
128
Member Avatar for MrNoob
Member Avatar for MrNoob

Hello guys I am reading some book but there and went to input validation but there is something logical i dont get in it you know when press enter with getchar() sometimes it transmits newline to the program but book has solution but i don't know why it works i …

Member Avatar for MrNoob
0
107
Member Avatar for MrNoob

hello i have last problem with strings i dunno whats wrong with this i dont get sometimes the logic coz when i write the program i do it into smaller stuff but this rlly string stuff drive me insane i hope i m gonna master it in the end anyways …

Member Avatar for MrNoob
0
135
Member Avatar for MrNoob

Hey its me again i dunno this string stuff gonna drive me insane really been doing since yesterday exercises on string did half of them but i have this program which should remove chars that i specify and when i test with putchar it does remove them but The string …

Member Avatar for MrNoob
0
173
Member Avatar for MrNoob

Hello i m suppose to make a function that fetch the strings according to num and it will stop when num is finished or it encounter , or ' ' or newline i made the function but its acting weird as if there is a \0 placed in [code] #include …

Member Avatar for Dream2code
0
231
Member Avatar for MrNoob

well i alawys wondered when i make char name[]="bla"; and count by ptr it doesnt work it says cant count wrong argument to increment but see whenever i like make it a function like void putit(char *Name); it work i dunno why though why does it work then if its …

Member Avatar for MrNoob
0
105
Member Avatar for MrNoob

hello i m given a question in book i m reading that i copy element but using ptr to copy and other choice will be using normal integers to copy i did normal integer but copy i think i got a problem with it [code] #include <stdio.h> int copyarr(const int …

Member Avatar for MrNoob
0
94
Member Avatar for MrNoob

hey guys i know its kinda noobish not to understand them since i been coding for 1 month but there rlly some stuff which confuses me in multidimensional array and nested loops like here in this program I wanted to know if i sum up like in the array for …

Member Avatar for MrNoob
0
149
Member Avatar for MrNoob

Hey i m reading tutrial about rucursion and got code whish isnt complicated or anything but i dunno why it prints the way it does [code] /* recur.c -- recursion illustration */ #include <stdio.h> void up_and_down(int); int main(void) { up_and_down(1); return 0; } void up_and_down(int n) { printf("Level %d: n …

Member Avatar for ankush chander
0
141
Member Avatar for MrNoob

in my switch program keeps reading wrong input also i know i used way too much fflush(stdin); because stupid printf keeps inputting to the screen so scanf gets bad but i m sure i desinged program nice i dunno why when i like enter num 5 it keeps reading artichokes …

Member Avatar for MrNoob
0
152
Member Avatar for MrNoob

hello i coding a program that need to sum array according to its num like for example num[0] will only do that and num[1] sum[1]=num[0] +num[1]; sum[2]=num[0] +num[1] +num[2]; etc i got one idea first i will fill the num array with numbers then i go through after that with …

Member Avatar for MrNoob
0
89
Member Avatar for MrNoob

Hello people i got a h.w to do Using nested loops to produce the following pattern: F FE FED FEDC FEDCB FEDCBA I had idea to do it but that will require array and strlen(char first int of the outer loop) and the thing says that I must do it …

Member Avatar for MrNoob
0
229
Member Avatar for MrNoob

okay i understand all bitwise operators but in the chapter of k&r at bitwise operators i m really lost at there question i have no idea how to do them Exercise 2-6. Write a function setbits(x,p,n,y) that returns x with the n bits that begin at position p set to …

Member Avatar for Tom Gunn
0
378
Member Avatar for MrNoob

Hello i m reading chapter in K&R about bit operation whish totally confuses me i understand what all operators does but i dont understand the code itself [code] unsigned getbits(unsigned x, int p, int n) { return (x >> (p+1-n)) & ~(~0 << n); } [/code] it will right shift …

Member Avatar for jephthah
0
114
Member Avatar for MrNoob

i dunno im sure this output the good result i dont understand why it got not the output that i want [code] #include <stdio.h> void Squeeze2(char *str,char *save) { int i,x; int buffer=0;//used to save stuff for( i=0 , x=0 ; str[i]!=0 && save[x]!=0 ; i++, x++ ) { if( …

Member Avatar for csurfer
0
99
Member Avatar for MrNoob

i m trying to code htoi function in chapter 2.3 for K&R but problem i dunno where to start should i first read all string then after that change each character to its decimal and then add them ? or any better ideas?

Member Avatar for Narue
0
573
Member Avatar for MrNoob

I m trying to find the biggest number in the array but problem is that it keeps returning one [code] #include <stdio.h> int FindBiggest(int *arr,int choice) { int i; int num=0; for(i=0;arr[i]<=sizeof arr;i++) { if(num<arr[i]) num=arr[i]; } return num; } int main(void) { int arr[]={0,5,3}; int result; result=FIND_NUM(arr,BIGGEST); printf("%d\n",result); getchar(); …

Member Avatar for jephthah
0
138

The End.