- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Developer, Engineer, Embedded Developer
- Interests
- Programming, Embedded System, Linux opensource Driver Developments, Computer Games, Chess Engines
- PC Specs
- Macbook Pro retina 13.3', Debian 7.7 Home PC quad-core AMD, 8 GB, 500GB
I have inputs in the form like below Data: 01 18 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 10 01 23 45 67 89 AB CD EF 02 18 67 89 AB CD EF FE DC BA 98 76 54 32 10 … |
|
I have a text file in the form like below sourceFiles { hello.cpp, hi.cpp, main.cpp, } headerFiles { hello.h, hi.h, } path { source [ what, how, which, ] header [ include, inc, head, ] } I need to populate several lists from this text file. So far I have … |
|
I have a small snippet. It is related with several malloc statements. Can somebody please explain. #include <stdio.h> #include <stdlib.h> int main(){ char* ptr1 = (char*)malloc(10); free(ptr1); char* ptr2 = (char*)malloc(10); free(ptr1); char* ptr3 = (char*)malloc(10); free(ptr1); return 0; } **What will happen to the snippet..? Will the malloc for … |
|
Re:
Hello to all programmers out there. Considering the growing request for practice problems by the beginners, we ( Me, Joey, Niek, Aaron..) have decided to start a sticky which will host some common practice problems which would help the beginners in understanding the programming concepts in a better way. (Did … |
|
Can you please explain the reason of the garbage output instead of the each words in the string.. #include <stdio.h> #include <string.h> #include <stdlib.h> int count = 0; //char** memptr = NULL; char** push(char* word, char** memptr){ if(count > 1) memptr = (char**)realloc(memptr, (count * sizeof(char*)) ); memptr[count - 1] … |
|
Re:
How this calculation is done i'am confused i am getting an answer 14 ?? #include<iostream> #include<conio.h> using namespace std;main() { int a=5; int d; d=++a + ++a; cout<<d; getch(); } |
|
Re:
main() { int i=5; printf("%d%d%d%d%d",i++,i--,++i,--i,i); } Answer: 45545 Thanks in advance. |
|
Re:
I was asked to write a program to eliminate the reoccurrence of numbers in an interview? For example if I give the input as 2233555697 then the output should be 235697 |
|
I have made this code. It is working good. Can anyone please help me to make it more optimised? Here is the code. /* ∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑ Author: Mayukh Sarkar Email: mayukh2012@hotmail.com Country: India License: GPL public Copyright ® © ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ */ #include <stdio.h> #include <stdlib.h> static int size = 0; typedef … |
|
Re:
The problem is while i execute my code the function modifiko_note(); doesn't work in a proper way. It execute with errors.`` #include<stdio.h> #include<stdlib.h> #include<string.h> #include<sys/stat.h> #include<conio.h> struct student{ char emri[20]; char mbiemri[20]; int nota[100]; int grupi; }stud; struct lendet{ char emri[20]; int kredite; }lenda; FILE *bin; FILE *file; void regjistro_lende(); … |
|
Re:
this line returns `lvalue required as increment operand` error message with gcc-4.7 hwrcolor c; u8 *dest; *(((unsigned char *)dest)++) = c; I changed it hwrcolor c; u8 *dest; *((unsigned char *)dest) = c; dest += sizeof(c); and u32 * u32Dest; hwrcolor c; u8 *dest; u32Dest = ((u32 *)dest); *u32Dest = … |
|
Re:
**Student and Courses Record Management System (LinkList of LinkList)** In this Assignment you need to create a small student and courses record management system with following functionalities. 1- Add New Student This function will allow you to add a new student record,you can use any three attributes of your choice … |
|
Re:
I have written a Makefile which compiles my mini-os with another application. I have to use -nostdioc and -nostdlib to compile them, but the problem is, that application is using stdio/stdlib functions and when I run my Makefile I get the error message that the functions used by my application … |
|
Re:
Hello, I am caputing sound from a codec using a microcontroller and sending it over to the laptop using a serial port .Now I want to use this buffer of values to regenerate the captured sound in Windows using C/C++. I have no idea about how to do it?Can some … |
|
Re:
Hi everyone, I’m beginner and I need a little help. I have to make RPN (postfix) calculator using stack which is implemented by singly linked list in C. Now I found that but in C++ and I’m having trouble translating it to C. Can you help me getting things to … |
|
Re:
Hi everyone, My program is crashing on taking input of alpha-numeric and store it in char[]. I don't know why, please anyone help ! sample input : C9H8O4MgOH #include <iostream> #include <string.h> using namespace std; bool hydroxide(char[]); int main() { char formula[] = ""; cout<<"Enter chemical formula : "; cin … |
|
Re:
Swap 2 number without using third variable code do not use temp variable for swapping if the code was useful please let me know [code]#include <stdio.h> void main() { int a,b; printf("enter number1: ie a"); scanf("%d",a); printf("enter number2:ie b "); scanf("%d",b); printf(value of a and b before swapping is a=%d,b=%d"a,b); … |
|
Hello guys can anyone please help me in a problem relating to file. The problem is that I want to use `fgets` on a c file from another c file and increment a the counter every time to get the number of lines and I also want to put the … |
|
Re:
Hi all, Suppose if I write two programs of same functionality but with different methods and want to measure the run time efficiency how do i know? I mean to say i want to measure the run time of each code how do i do it? Should i check the … |
|
Re:
pls can i get a code for the following example 1 ** 234 **** 56789 ****** |
|
Hey is there anybody who works with SDCC to make projects for 8051 microcontroller series on Macbook. If yes then can you please post the working make file, specially the part which loads the program in the device. I am confused what to write specifically with the program tag in … |
|
Please explain when this error occurs.. duplicate symbol _Firstdata in: list.o main.o ld: 1 duplicate symbol for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) |
|
I have a small program for Linklist in C.. ** linklist.h** // // linklist.h // LinkList // // Created by Mayukh Sarkar on 17/04/15. // Copyright (c) 2015 Mayukh Sarkar. All rights reserved. // #ifndef __LinkList__linklist__ #define __LinkList__linklist__ struct LinkList{ int Data; struct LinkList* NextData; }; struct LinkList *Firstdata = … |
|
Why the following code is giving me an error like this `make: *** [all] Segmentation fault (core dumped)` the source code is like this #include <stdio.h> int main() { int i; char* ptr = NULL; *(ptr + 0) = 'H'; *(ptr + 1) = 'e'; *(ptr + 2) = 'l'; … |
|
I have these files.. **str.h** #ifndef _str_h_ #define _str_h_ struct STRSTR { char* MainStr; char* SubStr; }; char* str_str(int, int, struct STRSTR* sample); void init(char*, struct STRSTR* sample); #endif /* _str_h_ */ **str.c** #include "str.h" #include <stdio.h> void init(char* str, struct STRSTR* sample){ sample->MainStr = str; } char* str_str(int index, … |
|
**Okay this is my first post and I am quite excited that how it will be recieved by the community. I have a long experience in C++ programming but never been a part of any community hence I believe that as a tyro, my mistakes will be ignored.** This post … |