15,547 Topics

Member Avatar for
Member Avatar for MS KRITI

/*CODING A PROGRAM FOR LOGIC GATES*// #include<stdio.h> #include<conio.h> [CODE] int x,y,z; //printf("Enter value of x"); scanf("x:",&x); //printf("Enter value of y"); scanf("y:",&y); And(int,int) if(x==1&&y==1) printf("z=1"); else printf("z=0"); Or if(x=0&&y==0) printf("z=0") else printf("z=1"); Not if(x==0) printf(z=1) else printf(z=0) [/CODE]

Member Avatar for sofoklis
0
5K
Member Avatar for Adam_28

Hello all hope all is well, Im new to c# and new to the site so bare with a noob :). any way I have an assignment and Im running in to a problem where I don't know how to have c# read a text file and turn the numbers …

Member Avatar for jacks009
0
332
Member Avatar for JohnMcPherson

Hello, I am having two problems with three C sursor screens I coded, using the curses library. The first problem is that a field will not highlight when I move the cursor to that field, even though I use the wattron command to highlight it. I can get the highlight …

Member Avatar for AssertNull
0
429
Member Avatar for manaila

I have been struggling with this for two days now, with no luck. I have a **C** `char` array `char myArray[] = "Hello World";` I also have a pointer to pointer to *char* `char **ptr;` So I want to somehow store `myArray` to `ptr` or somehow convert `myArray`into pointer to …

Member Avatar for jacks009
0
313
Member Avatar for can-mohan

Hi All, In below code snippet multithreading is used to take care of multiple requests from client. I beileve creating and detaching thread will eat lots of CPU cycle and it won't improve the CPU utilization as well. Can anybody let me know if thread pool can be used here …

Member Avatar for can-mohan
0
213
Member Avatar for directorabbey

void Halt (); void Reply (const char * num,uint8_t stat); { this is the error message for this code 7|error: 'uint8_t' has not been declared 9|error: expected unqualified-id before '{' token

Member Avatar for directorabbey
0
266
Member Avatar for mcjiwe

Hello guys, I have this structure with another double pointer structure inside that I need to pass through named pipes with the function WriteFile from WinAPI. typedef struct Labyrinth{ Cell **board; int currentLevel; } Labyrinth; typedef struct Cell{ BOOL wall; BOOL player; BOOL object; BOOL enemy; BOOL labyrinthExit; int objectType; …

Member Avatar for rproffitt
0
409
Member Avatar for JohnMcPherson

Hello, I am having a problem with the fgets statement not reading data correctly. It reads most of the data I need without a problem, but three lines of data are not read correctly. The code in question follows: strcpy(passw,"P7"); fscanf(fip, "%3s", ckod); /* card # 164 */ fprintf(ff16,"\n\n%12s%12s\n", "card# …

Member Avatar for AssertNull
0
3K
Member Avatar for JohnMcPherson

Hello, I am developng a screen for a state to enter special rates to augment its unemployment trust fund. I have the screen coded, and it compiles cleanly, but when I try to run it, the screen does not come up. There is no error message and no file I …

Member Avatar for JohnMcPherson
0
362
Member Avatar for Quezia
Member Avatar for negru

I need help with the following program: Create linear representation of stack with size N. Stack contains N binary search trees with serial number of the position on the stack from 1 to N and with the minimum p and maximum q nodes in a tree. Values p and q …

Member Avatar for rproffitt
0
348
Member Avatar for Yahia Farghaly

I am trying to reverse a word using pointers but the problem that the following line cause error:access violation writting location 0x000... *temp = *(n+len); the full code #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<Windows.h> #include<string.h> void re(char *n){ int len = strlen(n); char *temp=NULL; while (len != 0){ *temp = *(n+len); …

Member Avatar for janijani7
0
288
Member Avatar for emilyjackson

Hi there, I am an undergraduate studying computer science. Our lecturer gave us an assignmnet to use Dapfor grid control display both authors name and their book. I don't know where to begin from. Can anyone put me through; maybe with an example.

Member Avatar for rproffitt
0
129
Member Avatar for gugushe

fatal error: pwd.h: no such file or directory, I got this error when trying my code when using the following library #include<pwd.h>

Member Avatar for AssertNull
0
226
Member Avatar for shubhamgore

[B]hi friends[/B] this small compact code is for printing any number of prime numbers in C Language, you just have to change the last line's 500 to any number you want, here some points necessary to understand the code are as follows- 1.> variable torf stands for true or false,in …

Member Avatar for markanderson4
-6
866
Member Avatar for lanzslumber

Hi all. I am new in C language. I am learning to program by using C for my first step. Now I am reading a chapter about looping (while, for, do.. while, nested loop). In my exercise book, the question is about to: Using nested loop to print out this …

Member Avatar for markanderson4
0
3K
Member Avatar for Louie_Rave

Hello, I'm just new here. I wanted some people to help me with my project. We were tasked to do a game using Turbo C. I already found some games that has source codes like snake, tic toe, etc. I wanted to be slightly different 'cause I know my classmates …

Member Avatar for markanderson4
1
4K
Member Avatar for CodyOebel

I wrote this code : #include <stdio.h> int main() { int a,b = 10,c,d; a = printf("b is %d\n",b); c = printf("a is %d\n",a); d = printf("c is %d\n",c); printf("d is %d\n",d); // lose a null terminator in the previous strings ?? c and d // are 7, but a …

Member Avatar for CodyOebel
0
305
Member Avatar for COKEDUDE

I have four array of strings. I would like to print out the strings with this formatting: printf(" %d \t %s \t %s \t %s \t %s.\n", quadruples_line_counter, strings_quadruples1_action[0], strings_quadruples2_variable1[0], strings_quadruples3_variable2[0], strings_quadruples4_temp_variable[0]); It gives this output: 17 func sub int 3. 17 param (null) (null) (null). 17 alloc 4 (null) …

Member Avatar for rproffitt
0
431
Member Avatar for Riley_1

Hi there. I've been trying to wrap my head aound this seemingly simple problem. I am write a game and I need to show on the screen the number of seconds the game has been playing for. This is the best way I can come up with but it doesn't …

Member Avatar for rproffitt
0
212
Member Avatar for Maria_15

Write a program that accepts five input values and stores them into an array. The program should then display the average of the five numbers. Finally, the program should display all the numbers in the array that are larger than the average of the five numbers. So I did the …

0
97
Member Avatar for COKEDUDE

In the str char array below I would first like to locate the first math symbol I see, then I would like to count backwards and remove whatever is between the previous three " _ " and remove the three " _ ". Can I please get some ideas on …

Member Avatar for AssertNull
0
250
Member Avatar for COKEDUDE

How does this compile? I forgot to set my second condition in my second for loop and it compiles. if(cmp_str5 == 0 || cmp_str6 == 0) { if(cmp_str5 == 0 || cmp_str6)

Member Avatar for Reverend Jim
0
175
Member Avatar for yhh

Hi, I'm still a beginner for C programming. In my assignment I've encountered this problem and I know is a linker problem but I'm not sure how to solve it. I'm trying to link 3 files which 2 .c files and 1 .h file. Below are the codes for my …

Member Avatar for Sean1234$
0
14K
Member Avatar for Andrey_4

Here is a small e-Book for your attention: [The Ultimate Question of Programming, Refactoring, and Everything](http://www.viva64.com/en/b/0391/). This book is intended for C/C++ programmers, but it could be of interest for developers using other languages as well. What makes the book peculiar is the descriptions of real, not theoretical cases at …

0
142
Member Avatar for chrisschristou

hello, how to setup eclipse IDE to use visual c/c++ compiller. i have visual studio express on my computer i guess this include c++ compiller what probably do compile c. so i would like to know how can i use the the visual c/c++ compiller in eclipse IDE thanks you …

Member Avatar for rproffitt
0
1K
Member Avatar for Haider85

I have some data in varbinary(max) from database and I have exported it to physical files. Some of these files were in jpeg so I was able to just add an extension .jpg to it and it opened. The rest are not jpeg files. **I have tried almost all the …

Member Avatar for rproffitt
0
432
Member Avatar for humble55

Hello Hello i have struct dynamic array (matrixCov) like this *array = (struct matrixCov*)malloc(sizeof(struct matrixCov) * counter); now i have another struct Link list with element Data type -struct matrixCov (struct matrixCov * data) now when i type this line for (k=0;k<conter;i++){ (*pointer)->data =array[k];} when k=0 copied well but from …

Member Avatar for AssertNull
0
728
Member Avatar for Strong_1

1. Design a system for an electronics retail store which sells different brands of electronic items like TV, Fridge, Oven, Music System of different brands and styles. 2. You develop a menu driven system which looks like as given below: s. Sell g. Generate Bill c. Cancel the sale r. …

-1
143
Member Avatar for Gede_1

#include<stdio.h> #include<stdlib.h> struct node { int data; struct node *next; }*head; void append(int num) { struct node *temp,*right; temp= (struct node *)malloc(sizeof(struct node)); temp->data=num; right=(struct node *)head; while(right->next != NULL) right=right->next; right->next =temp; right=temp; right->next=NULL; } void add( int num ) { struct node *temp; temp=(struct node *)malloc(sizeof(struct node)); temp->data=num; …

Member Avatar for AssertNull
0
6K

The End.