15,551 Topics
| |
Hey, I've been trying to search for a nice, easy-to-read material about signals in C. So far I haven't found anything that could get through my gray brain mass. My university's material gives only a small surface scratch to the topic, and internetz hasn't been able to tell me much … | |
Hello, If I have a text file with the format: Name = MattPhilip Age = 22 how can I use C to read from the file and fill in a structure? Thanks | |
hey guys i'm trying to write a code using stacks in C the code should recognize the parenthesis if it closed or opened or not I've done the greater part of the code, but I'm so confused .. I have to submit it after 4 hours .. please I need … | |
hello friends an anyone help me whether one can create a tic-tac-toe game in C | |
Hi,I am trying to scan a string to char *name inside struct data but it gives me segmentation fault. please help thanks. [ICODE]#include <stdio.h> #include <stdlib.h> #include <math.h> #include <ctype.h> #include <string.h> struct data { char *name; }; typedef struct data data; int main(void) { data first; data *fp; fp=&first; … | |
Well, after searching through some old posts here, I found that there were different ways to go about playing general sound effects in C. Can anyone help me figure out how to play sounds in my programs? I'm making them in C ( hence this sub form) and I'm on … | |
ok, im clueless.. i need to create a storebot (for buying and selling items) on a game i play called Eternal-Lands.. i dont have a clue where to start.. any help will be much appreciated | |
It's my First Program using circuar singly linklist [CODE] typedef struct clist { int data; struct clist *next; }CLIST; CLIST *cp = NULL; [/CODE] Add new node function [CODE] void add(int num) { CLIST *r; r = malloc (sizeof (CLIST)); if (!r) { printf("\n\n Not Enough Memory"); return; } r->data … | |
I wanna ask, How can we reverse a number by using Recursive ? For example if a number is 123, the result will be 321. is that any idea to help me? because i can't think about it... i poor on this chapter. | |
Could we find the largest among three numbers using 'for' and if? I have the following program, please check it #include<stdio.h> main() { int a,b,c,sum=o,i'; printf("enter the numbers"); scanf("%d%d%d",&a,&b,&c); sum=a+b+c; for(i=sum;i<=sum,i--) { if(i==a||i==b||i==c) printf("%d the greatest"); exit(); }}........please clarify the logic if it is correct to the intention.. | |
trying to do a program that sums all the even numbers in the sequence but i think im doing it wrong heres my code [CODE]#include <stdio.h> int fib ( int n ); int main ( int argc, char *argv[ ] ) { int i , sum = 0 ; for(i … | |
The following lines of code output "FFFFFFFF" #include <stdio.h> int main(void) { int i; i=-1; printf("\n%X\n",i); return 0; } This is the 32-bit representation of -1 in Hex. I'm trying to get it to output fewer bits: e.g. 24-bit: FFFFFF In fact, the output I want needs to be 6 … | |
I'm very interested in learning C before C++ but I can't find good books The K&R book looked very organized and short but it seems it is very outdated. So my two questions are.. Should I read the K&R book even thought it uses an old standard, if I do … | |
I have the following code for converting a list of t infix expressions into their postfix form:- [CODE] #include<stdio.h> #include<string.h> #include<ctype.h> #define MAX 400 struct stack { char arr[MAX]; int top; }; void initstack(struct stack *); void push(struct stack *,char); char pop(struct stack *); void convert(struct stack *s,char *); int … | |
I have a question about embedding Perl scripts in C. I wrote most of the program in C and a portion of it in Perl. As of right now, to call the Perl script I'm using pipe(), fork() and dup2() to create another process and have the Perl application write … | |
#include "Stdio.h" [CODE]main() { int a,b,c; int count = 1; for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\ TFy!QJu ROo TNn(ROo)SLq SLq ULo+\ UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\ NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\ HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\ T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\ Hq!WFs XDt!" [b+++21]; ) for(; a-- > 64 ; ) putchar ( ++c=='Z' ? c = c/ 9:33^b&1); return 0; … | |
I have the following code for Quick Sort procedure: [CODE] #include<stdio.h> void Quick_sort(int *arr,int left,int right); int Partition(int *arr,int left,int right,int pivotindex); int main() { int a[20],n,ctr=0,j=0; printf("\nEnter number of elements:"); scanf("%d",&n); printf("Enter array elements:"); while(ctr<n) { scanf("%d ",&a[ctr]); ctr++; } Quick_sort(a,0,n-1); printf("\nSorted Array:"); while(j<n) { printf("%d ",a[j]); j++; } … | |
Hello all. Can anyone here help me create a separate function for the socket() API in socket programming? I successfully created one in Linux before but so far I can't do the same in Windows. The Windows version can't successfully connect using the separate socket() function. My primary suspect is … | |
Consider the error in following program- [CODE] #include<stdio.h> #include<conio.h> #define MAX 100 struct stacktype { int stack[MAX]; int top; } ; void push(struct stacktype * s,int item) { if(s->top==MAX-1) { printf("Overflow"); return; } s->top++; s->stack[s->top]=item; } int pop(struct stacktype *s) { int item; if(s->top==-1) { printf("UnderFlow"); return -1; } item=s->stack[s->top]; … | |
Hi string copy not working with following code VidZone[Loop].pui8Source = (UINT8 **)malloc(FileCount * sizeof(UINT8 *)); for(FileIndex = 0 ; FileIndex < VidZone[Loop].ui32NoOfSourceFiles ; FileIndex++) { VidZone[Loop].pui8Source[FileIndex] = (UINT8 *)malloc(255 * sizeof(UINT8)); strncpy(VidZone[Loop].pui8Source[FileIndex] , pui8SourceString[FileIndex] , 255); } "pui8Source" is a double poiner and `pui8SourceString[FileIndex]` array of character pointers. Please let … | |
Do I understand that by using the following code [CODE] a = getchar(); b = getchar();[/CODE] , after pressing "1" and "Enter" keys ( Enter - to continue programs work), we can derive the following variables - [CODE]a = '1'; b= '\n';[/CODE] thanks in advance)) | |
I'm supposed to define a function that removes all nodes with a specified value from a linked list. I have to use this structure: [CODE=c] typedef struct LIST { int Object; struct LIST *Next; } LIST; [/CODE] and here is the function I wrote [CODE=c]void LDeleteElem(LIST **List, int Elem) { … | |
ok, below is the code that i have tried and still not working; #include <stdio.h> int main () { char Name; int Age; int Date_Of_Birth; float Place_Of_Birth; float Email_Address; printf ("Name:"); scanf ("%c",&Name); printf ("Age:\n"); scanf ("%d",&Age); printf ("Date Of Birth:\n"); scanf ("%d",&Date_Of_Birth); printf ("Place Of Birth:\n"); scanf ("%s",&Place_Of_Birth); printf … | |
I am using CODEBLOCKS and I am creating a program that performs basic operations like add, delete and insert on Doubly LinkList , My Program is working fine on older Turboc compilers. But when i run it on codeblock its causing problem when i try to delete a node. [CODE] … | |
i'm new to array. we were given this exercises to be solved: but i have question about [I][COLOR="Green"]letters of ten elements[/COLOR][/I], [I]array integer which is called [COLOR="green"]totals[/COLOR][/I], [I]contents of the character array called [COLOR="green"]words[/COLOR][/I], arrays elements and a lot of stuff that seems to be going with it. thank you. … | |
EDIT: I found the solution already. I had to malloc() memory for rec_msg. :) Hi, I've got a little problem with my (unix) C program. I'm trying to make a HTTP request to fetch a page from a site. I can resolve the IP, make a socket, connect and send … | |
i'm new to array. we were given this exercises to be solved: but i have question about letters of ten elements, array integer which is called totals, contents of the character array called words, arrays elements and a lot of stuff that seems to be going with it. thank you. … | |
[CODE]// Project: XorLib - Xor Encryption Libary. // Copyright: Copyright © 2009-2010 Shadowscape Studios. All Rights Reserved. // Developer: Shadowscape Studios // Website: http://www.shadowscape.co.uk // Support: support@shadowscape.co.uk // Version: 1.0.0.0 // Release: 151220102240 #define export __declspec (dllexport) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <windows.h> long filesize(FILE *f) { long … | |
i need some example programs on counter in embedded c for AT89c51 micro controller can u please .............. | |
what is the difference between a simulator and an emulator? Please define both of them too, i am really confused with the working of DOSBOX emulator |
The End.