15,551 Topics
| |
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 … | |
#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 | |
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) … | |
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? | |
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 … | |
What is the algorithm to check one gate's output to be stuck-at-1 or stuck-at-0 ? Thanks in advance. | |
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. | |
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 | |
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 … | |
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: … | |
i have to make a software product on food an billing system in C language..plz help me.. | |
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, … | |
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...... | |
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 … | |
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 … | |
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 | |
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 … | |
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. | |
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 … | |
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.. | |
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 … | |
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 … | |
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 … | |
| 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 … |
#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 … | |
/* 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 … | |
| 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. … |
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. | |
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 … | |
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 … |
The End.