What is an unsigned char??

In C/C++, what an unsigned char is used for? How is it different from a regular char? ...

Sign extend a nine-bit number in C?

I have a short, instr, that looks like this: 1110xxx111111111 I need to pull out bits 0-9, which I do with (instr...

Case Insensitive String comp in C?

I have two postcodes char* that I want to compare, ignoring case. Is there a function to do this? Or do I have to l...

Given a starting and ending indices, how can I copy part of a string in C??

In C, how can I copy a string with begin and end indices, so that the string will only be partially copied (from beg...

Converting Letters to Numbers in C?

I'm trying to write a code that would convert letters into numbers. For example A ==> 0 B ==> 1 C ==> 2 an...

Reading the whole text file into a char array in C?

I want to read the contents of a text file into a char array in C. Newlines must be kept. How do I accomplish this?...

How to convert unsigned long to string?

In the C language, how do I convert unsigned long value to a string (char *) and keep my source code portable or ju...

fgetc(stdin) in a loop is producing strange behaviour?

I have this code while(1){ printf("hello world !\n"); fgetc(stdin); } when this runs and I enter a letter...

Difference between printk and pr_info?

What's the exact difference between printk and pr_info functions ? And under what conditions, should I choose one ov...

What does the “rcs” option in ar do??

I did read the man file but it does not help. "rcs" seems to be the most popular option to pass to ar, but the meani...

Printing unsigned short values?

unsigned short a; char temp[] = "70000"; a = atoi(temp); printf("a: %d\n", a); Gives me the output a: 4464...

Fatal error 'stdio.h' not found?

Why am I getting this message? The compiler is clang. Here is a simple program where it occurs for examples sake: #...

Convert long long to string in C??

I'd like to convert a long long to a string in C. long long x = 999; I'd like to convert x to a string. How coul...