write a program for size of a data type without using
sizeof() operator?
Answer Posted / mazhar shaikh
datatype a,*p,*q;
p=&a;
q=p+1;
cout<<abs(int(p)-int(q))<<endl;
| Is This Answer Correct ? | 5 Yes | 7 No |
Post New Answer View All Answers
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
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 is the difference between printf and scanf in c?
How can I send mail from within a c program?
What is the best style for code layout in c?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
can any one provide me the notes of data structure for ignou cs-62 paper
Write program to remove duplicate in an array?
What is the difference between far and near ?
What is break in c?
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values
What is 02d in c?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
Can you please explain the difference between malloc() and calloc() function?