15,552 Topics

Member Avatar for
Member Avatar for yashsaxena

Hello All Is it possible to check the ip address of a particular web site? If yes what will be the code?

Member Avatar for venomxxl
0
163
Member Avatar for Buffalo101

Hello, I have a function that looks like this: [code=C] CMyMessage(char type, char *name, char namelen, char *text, char textlen){ ... ?! } ... void main() { char name[50]="JOHN"; char text[200]="testing123"; CMyMessage(1, name, strlen(name), text, strlen(text)); } [/code] The ranges are: Type = 0/1; namelen = 0..50; textlen = 0..200 …

Member Avatar for rubberman
0
121
Member Avatar for zeeshanvirgo

I am Zeeshan from Pakistan. now living in KSA. I need help regarding to chose computer programming language to learn online without going to any institute as i do not have any time here to go any where, and also i think that i have to become a comp programmer …

Member Avatar for venomxxl
0
77
Member Avatar for shanki himanshu

i have just giving a command textcolor(5+BLINK); cprintf("abc"); it will blink and print abc. but now after this i want to input a string and the problem is the input string also blinking which i dont want. how do i solve this????

Member Avatar for L7Sqr
0
57
Member Avatar for Buffalo101

Hello, My program looks something like this: [code=C] char *name= (char *)malloc(200); unsigned char type=1; unsigned char GetType(){ return type; } char* GetName(){ return name; }; void function(unsigned char* message, int* intPtr){ message[0]= GetType(); // works correctly // CODE HERE } void main(){ unsigned char *message= (unsigned char *) malloc(256); …

Member Avatar for gerard4143
0
398
Member Avatar for benjamin.sh

Dear members... I'm looking for a code in C language to calculate the sum of two number in Hexadecimal base.But I don't wanna use Math library.Please help me to do it as soon as possible... Respectfully...

Member Avatar for L7Sqr
0
1K
Member Avatar for volkang

hi, is there any code that calculates the cdf of lognormal distribution? i came across one in codecogs.com but it requires commercial license:/ any help would mean a lot. thanks from advance

Member Avatar for volkang
0
110
Member Avatar for rockerjhr

globals.h [CODE] #ifndef _globals #define _globals #define NEXT(L) ( (L) -> next ) #define DATA(T) ( (T) -> datapointer ) #define LEFT(T) ( (T) -> left ) #define RIGHT(T) ( (T) -> right ) typedef enum { OK, ERROR } status ; typedef enum { FALSE=0 , TRUE=1 } bool …

Member Avatar for WaltP
0
193
Member Avatar for Ammara Sajid

hey guys! how do i calculate the sum of a column in .csv file format using C? e.g my fie looks like this 1, 2, 3, 4 2, 3, 4, 5 3, 4, 5, 6 (the ',' shows new cell) how do i calculate sum of each column (desired answer …

Member Avatar for WaltP
0
1K
Member Avatar for JDevelop

Hi, I'm beginning with C and makefiles. I'm trying to compile a list of C files with GNU Make. My code should compile all the C files in the folder into .o files along with few flags and then use these .o files to compile an executable file 'main'. and …

Member Avatar for nezachem
0
8K
Member Avatar for SIFA

Can someone show me a sample code in c which can read in a user inputted sentence/line and then split that line down by white spaces into separate words please? I shall worship you as my new God if someone out there can just show me a sample solution.

Member Avatar for L7Sqr
0
128
Member Avatar for venomxxl

I'm writing a pure C game engine. I assert every pointer returned by malloc() in my code. Now I'm writing a function that will "slice" a loaded texture into new textures (parts of the parent texture). The parent texture is loaded correctly (other textures loaded by the same loader were …

Member Avatar for venomxxl
0
317
Member Avatar for gerard4143

How do you initialize a dynamic structure that has a const data member? I can provide an ugly hack but I'm at a loss as how to do it correctly. Actually, can you do this in a platform independent way? [code] #include <stdio.h> #include <stdlib.h> struct mys { const int …

Member Avatar for Narue
0
162
Member Avatar for rain_meiwah

I've built successfully my server & client program in C, able to establish the connection and message can be sent from both side client <-> server. Pls help me to deploy for:- (1) How to transfer file? (2) If i enter command e.g. - "pwd" in client side, current directory …

Member Avatar for jamesbondbest
0
119
Member Avatar for t_man700

Hi guys, I've got a question that hopefully someone can answer. I have a file that contains the following structure: g hub f 100 200 300 12 f 356 403 345 484 f 333 212 1203 393 g door glass f 323 9292 383 f 32 3838 3939 f 1231 …

Member Avatar for WaltP
0
392
Member Avatar for BLUEC0RE

My original plan was to pipe "ls -l", get the permission string that represented the file in question. Translate the string of 'r's 'w's 'x's '-'s into 0s and 1s then convert it from binary to octal. This seems really cumbersome and annoying and I gotta figure there is some …

Member Avatar for BLUEC0RE
0
171
Member Avatar for abk07

Hi! I’m trying to write a ‘C’ program to extract variable definitions and variable use in each line from a input ‘C’ program. That is, a variable is said to be defined when its value changes(including declarations) and it is said to be ‘used’ when it is referenced. I need …

Member Avatar for WaltP
0
208
Member Avatar for jalpesh_007

I have made floyd warshall algorithm. I need some help for finding shortest path from source to destination. We have to give source and destination. Eg. Program gives us output like source=A and destination=D then shortest path is A-B-D with distance 10. I also give the code for that in …

Member Avatar for rubberman
0
366
Member Avatar for Daita

[CODE]#include<stdio.h> #include<conio.h> main() { typedef enum y; int c; y colour {RED,WHITE,BLUE,BLACK}; clrscr(); printf("The assigned value is %d\n",RED); printf("The assigned value is %d\n",BLUE); printf("The assigned value is %d\n",BLACK); c=RED+BLACK; printf("RED+BLACK IS %d",c); getch(); }[/CODE] What is wrong with this code please? 

Member Avatar for Daita
0
161
Member Avatar for asrockw7

[CODE] void printTable(char (*tacToe)[3], int row, int col){ } void initTable(char (*tacToe)[3], int row, int col){ } int main(void){ char tacToe[3][3]; initTable(tacToe, 3, 3); printTable(tacToe, 3, 3); } [/CODE] here is my question. what is the difference between *ary[] and (*ary)[]? when i did the program initially like so: [CODE] …

Member Avatar for asrockw7
0
258
Member Avatar for Rakesh Mall
Member Avatar for t_man700

Hey guys, I have a really quick and hopefully easy question for you all. I'm trying to read in and store some floating point numbers from a file into an array. The lines look like: [B]boom.txt:[/B] [CODE] v 0.000034 0.44556 0.34444 v 4.000 1.0 1.0 v 4.00056 1.2003030 4.000 [/CODE] …

Member Avatar for t_man700
0
137
Member Avatar for JDevelop

Hi everybody! Now I'm dealing with binary file handling and I need to read 70 bits into a variable from a file. As far as I know (correct me please, if I'm wrong), C does not have any variable type that could hold such large data. (I think) I cannot …

Member Avatar for JDevelop
0
2K
Member Avatar for baby_c

Hi friends, well... i'm asking for another help from you guys.hope you will... My friend sent me a email asking why the following code doesn't work properly.I'm also couldn't understand what's happening..When this program run it supposed to prompt two times to enter values.but its actually prompt once. I tried …

Member Avatar for WaltP
0
216
Member Avatar for jamesbondbest

i am trying to write a split function ...which will accept a array and split it down to diffrent strings on the basis of '-' symbol can u tell me where i am wrong i am getting segmentation fault ...i think it is due to the pointer array i used …

Member Avatar for Ancient Dragon
0
79
Member Avatar for virtue

Hi all, I wrote a program that has many functionalities but I can not swap 2 elements of 2 nodes in the linked list.Actually I can swap 2 nodes by changing their links but I can not swap 2 elements when the user requested 2 elements swapping.Here is my code …

Member Avatar for Ancient Dragon
0
175
Member Avatar for mars001

I was trying to input an array of strings using pointers but failed. Here is the code: [CODE=C]int i=0; char *p[6]; //array of strings for(i=0;i<5;i++) { gets(p[i]); // input string } for (i=0;p[i];i++){ printf(p[i]); // print string printf("\n"); }[/CODE] The problem is that each time the first for loop executes, …

Member Avatar for mars001
0
225
Member Avatar for math.man

Please help me to write c program in order to calculate value as below: 1 + 3 + 4 + 6 + 7 + 9 + 10 + ... My Email: [snipped] [CODE][/CODE]

Member Avatar for abhimanipal
0
84
Member Avatar for johann26

I'm trying to make a deck of cards to use in a blackjack game but I'm having problems. [CODE]#include <stdio.h> #include <math.h> #include <string.h> main(){ int i; typedef struct { int rank, suit; } cardtype; cardtype deck[52]; cardtype hand[5]; char *rank[13] = {"ace", "Duece", "3", "4", "5", "6", "7", "8", …

Member Avatar for abhimanipal
0
93
Member Avatar for moroccanplaya

i am trying to write a simple webserver which serves 1 htnl file but i dont know where i am going wrong i am not able to read the file any suggestions ? [CODE] listen(sockfd,5); clilen = sizeof(cli_addr); newsockfd = accept(sockfd,(struct sockaddr *) &cli_addr, &clilen); if(newsockfd < 0) error("eror on …

Member Avatar for abhimanipal
0
171

The End.