Why variables can not be declared in a switch statement just after labels?
see this code
#include<stdio.h> int main() { int i=1; switch(i) { case 1: int x=10; printf(" x is %d",x); break; } return 0; } |
Do you think this code will compile? if yes then you need to read this post….
How can i detect Windows or Linux in C,C++ programming?
Sometimes we need to write platform independent code which works in windows and linux machine without giving any flag or any modification in code or make file manually.
So in such case i usually use compiler generated macro to check the platform .
In Linux all c and c++ compiler define macro like linux
, In Windows all c and c++ compiler define macro like _WIN32
so we can use this macro to separate code for linux and windows see belows example code
Huffman Encoding Using Linked List with Source Code
After a long time, I am back. Months without programming and then finally I got some time on my hands. So I set out to code the Huffman’s Data Compression Algorithm. And the result is here!
The code is well-commented and I hav given some additional documentation. Also, I hav tested it extensively – right from small words to complete bollywood Songs..:P
Here i had did two types of Huffman Encoding
1 ) Simple User Input
2) Take Input from File
But if there are any probs,let me know.
Search in this website
our sponsors
latest comments
- sagar on List of all standard version of c language
- Mohit Dhukia on How to access/unblock songs.pk in india?
- shinto peter on How to configure mail from localhost ( wamp ) using PHP?
- tammylleanne on Implementation limitation of c programming language
- Deepak on How to access/unblock songs.pk in india?
Find us on Facebook
Top Authors
Find us on stackoverflow
Polls
My Bookmarks
- Audio/video Recorder & player application based on MATLAB
- check dependency of your binary
- defination of all standard c programming language function
- Great Question-Answer on c programming
- know what your c code means
- Limition of c programming language
- List of all version of c programming language
- Online c compiler
- php freelancing work
- some more stuff on C programming language
- Volatile Keyword in Embedded System
- Write Android application in c language