15,551 Topics

Member Avatar for
Member Avatar for Ahsaas

I'm writing some code to serialize some data and write the serialize data to a file on disk. Currently data is in void* buffer and then trying to serialize using tpl with TPL_MEM so that later it can be write to file. But I am not very sure that how …

Member Avatar for Ancient Dragon
0
156
Member Avatar for saurabh.mehta.33234

#include<stdio.h> void main() { int n=5; if(n==5?printf("Hallo"):printf("Hai"),printf("Bye")); } The output of the above code is HalloBye..But I am not able to debug it..I know that ternary has precedence over comma operator but i am stuck at which operand will go with which operator..Can someone please help

Member Avatar for Moschops
-1
236
Member Avatar for JoeD1

Can some help me with my Default: It is printing the error message but at end of message is giving a decimal value for the char sign. How do I stop this from happening? #include <stdio.h> char sign; int x, y; int main() { printf("Choose:\n"); printf("a) Addition\n"); printf("b) Subtraction\n"); printf("c) …

Member Avatar for JoeD1
0
161
Member Avatar for usamaasghar.asghar

Hi every body! you are enjoying. I have a problem that if a person writes in his code: "system("shutdown -s")" in his program and if I run .exe file, my computer shutdowns. How would I dodge this trick?

Member Avatar for pritaeas
0
187
Member Avatar for nitin1

i know how numerical values are represented in memory. like +3, -3, 0, 1 , 3321 and like this. can you tell me how float, double are represented in memory ? like 3.220, -9876.87 ? i mean how bits are presented in memory ? like for singed number 32th bit …

Member Avatar for rubberman
0
202
Member Avatar for Sunil_6
Member Avatar for Ancient Dragon
0
72
Member Avatar for anitha av

hello...i am doing a project on connecting c language with sql. but i am unable to write the program in c language by using the sql code for connectivity. plz advise me as how to learn to write the c program using sql.

Member Avatar for sai subhashini
0
124
Member Avatar for fafa70

hi. i have written a program in c and also a makefile for it but i have a repetitive error: /usr/bin/ld:4.txt: file format not recognized; treating as linker script /usr/bin/ld:4.txt:1: syntax error here is makefile code: CC=gcc test2 : test2.c $(CC) test2.c 4.txt 5.txt 6.txt -I -lpthread -lrt -o test2

Member Avatar for deceptikon
0
3K
Member Avatar for cocopium

I have been trying VERY hard on this one and I cannot figure it out (I get the logic-- but not how to apply it in a COMPUTER). Here it is (please read the whole thing before answering): This is C programming (not C++) I need to design a program …

Member Avatar for cocopium
0
498
Member Avatar for mahesh113

Hi All, Could you please clear my doubt why this second catch block is called when exception is thrown only once. #include <iostream> using namespace std; class E { public: const char* error; E(const char* arg): error(arg) {} }; class B { public: B() {}; ~B(){cout<<"~B() called"<<endl;} }; class D: …

Member Avatar for deceptikon
0
347
Member Avatar for sumisimmy

i have to make a software product on food an billing system in C language..plz help me..

Member Avatar for sumisimmy
-1
118
Member Avatar for charlowiz

Design and code a program in c that converts time in seconds to hours, minutes and seconds and display the results. Implement using pointers and functions. You should have at least the following functions. • Reading time in seconds. • Converting seconds to hrs, mins, secs. • Displaying results hrs, …

Member Avatar for deceptikon
0
151
Member Avatar for Aadhya169

Hello members... How are you all ??? I just started the programming and want to learn C for that.. so please tell me the best book to learn the C from the starting... Thank you in advance......

Member Avatar for whitech
-1
294
Member Avatar for Arroway

I have to make a program that calculates the integral of a function using the simpsons method and the trapezoid method. It works just fine on my computer using MinGW, but when I try to compile it in my uni's computer (GNU OS) I get: It = 0 (should be …

Member Avatar for rubberman
0
168
Member Avatar for prakhs

I have an array of elements. Think each of the element as competitors, and a tournament is going to rank them. The output of the program is showing elements at each level. Here's the code: #include <stdio.h> #include <stdlib.h> bool isPowerOfTwo (int x) { /* First x in the below …

Member Avatar for iamthwee
0
245
Member Avatar for eladt

I need help writing a function to convert hex to arabic string to Example get string this : "D8B1D8B5D98AD8AFD8A7D984D8B1D982D985" and return this : رصيد الرقم in english-(Balance figure). **only c code** TNX

Member Avatar for Adak
0
2K
Member Avatar for deceptikon

I was asked this in an interview today: Q: `malloc(0); /* What does it do? */` It's a great question because it covers a subtlety in the standard and a condition that not many people will consider. Unfortunately, I wasn't 100% confident that I remembered what the standard said about …

Member Avatar for deceptikon
5
222
Member Avatar for danibootstrap

Hi, Is there a simple and small code for client and server to talk to each other over TCP/IP (windows sockets)?Please let me know.

Member Avatar for funtom
0
345
Member Avatar for jose.a.rueda.5

Hi! I have this kind of project and im really needing help for it. The compiling and print have to be a spiral matrix. it must start in the center and then move to the right and then up and then to the left, making a spiral. I have to …

Member Avatar for jose.a.rueda.5
0
156
Member Avatar for baby_c

Hi all, I wanted to create a computer warm which create a file all over a network for learning purpose. But have no idea where to start. Can anyone guide me through how to create a simple one?. Any examples would be great.. thanks..

Member Avatar for pritaeas
0
104
Member Avatar for costy.bogdan

Hello, I'm a newbie in C/C++ programming and I wonder if you can make me understand the following, I have a small c++ statement, and the result is somehow weird for me: `char[10] arr="torino", *ptr; `ptr = arr;` `cout<<*&*&ptr;` and the result gives me the entire string.... PS: This is …

Member Avatar for costy.bogdan
0
118
Member Avatar for nitin1

int m= i++ || ++j && k--; where i=2, j=3, amd k=5; acooridng to me, it will be executed left to right and then values of m=1, i=3, j=3 and k=5. but i have seen that precednace of && is more than || , than so how this expression is …

Member Avatar for Banfa
0
298
Member Avatar for suncica2222

Can someone coment this code in detail, I can't quite understand algorithm behind this? typedef struct node{ int x; int y; int value; struct node* row; struct node* col; }node; typedef struct matrix{ int height; int width; node** rowList; node** colList; }matrix; void insert(matrix** M, int row_index, int col_index, int …

0
139
Member Avatar for Jenniferting

Hi guys, im currently doing Conway's game of life and i'm almost there. The variable and all is in German since im studying here in Germany but i think one can still understand the code. There's one thing I need help with, which is with the Glider (Gleiter). When i …

Member Avatar for sepp2k
0
251
Member Avatar for nitin1

#include<stdio.h> void f(int n) { char pp[n]; printf("%d\n",sizeof(pp)); } int main() { int n; scanf("%d",&n); f(n); } In this program the size of array is defined at runtime,and sizeof operator is printing correct size after runtime initialisation in gcc 4.4. Can anybody explain? we say that sizeof is compile time …

Member Avatar for sepp2k
0
187
Member Avatar for dxprogrammer

/* This is source code of function which solves sudoku, function returns 1 if solution exists and 0 if not exist. In case if solution exists, you have resolution in entry parameter of this function You can run this function in function main() eg. if(sudoku(T)) print(T); where print(T) is group …

Member Avatar for nitin1
-1
251
Member Avatar for Rahul47

Hi folks, I recently started using lcc compiler for C, and am having diffculty in compiling and executing my programs.Each time I make a new file using File --> New --> File, I am not able to compile current file. The previous file which was opened gets compiled and exectued. …

0
66
Member Avatar for thechett22

I need help with this problem. I just don't know what to do. float price=56.95; float tax=1.05; float total=0; total=price*tax; print total; Output_____________________________ My professor wants me to determine what is printed in the output statement at the end and than do a corresponding flowchart. Can anyone help me please.

Member Avatar for munna.shk
0
97
Member Avatar for jesskavidja

I have a bit of a baffling problem! I'm writing a tag matcher in XML and whenever I run the below procedure, I get a garbage value after the name of every tag **except for the first one**. When I add the array text to the parameters list, the garbage …

Member Avatar for rubberman
0
294
Member Avatar for Smeagel13

Take the following C structure: typedef struct dataPoint { tick * tickData; struct dataPoint * previousDataPoint; struct dataPoint * nextDataPoint; } dataPoint; Compiling on a 64-bit system with 8-byte words, this structure takes up 24 bytes (3 words) of memory. 24 % 8 = 0 ... so it is word …

Member Avatar for Smeagel13
0
291

The End.