Which of the following is not a valid declaration for main
()?
1) int main()
2) int main(int argc, char *argv[])
3) They both work
Answers were Sorted based on User's Feedback
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What are the basic data types associated with c?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
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]
What does the c preprocessor do?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
Do you know the difference between exit() and _exit() function in c?
what is dangling pointer?
write a program for even numbers?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
What is the difference between abs() and fabs() functions?
What is the difference between %d and %i?