Write code for atoi(x) where x is hexadecimal string.
Answer Posted / audrius
long l = strtol(string, NULL, 16);
//or, if you need unsigned (which you usually do with hexes)
unsigned long ul = strtoul(string, NULL, 16);
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
Write a program to print fibonacci series using recursion?
What is the full form of getch?
What is the acronym for ansi?
Is c++ based on c?
What is the scope of static variable in c?
what are enumerations in C
What is a program flowchart?
What is data structure in c and its types?
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
Here is a good puzzle: how do you write a program which produces its own source code as output?
How do we print only part of a string in c?
What is scope rule in c?
How to declare pointer variables?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor