Write a simple program to find the size of different basic
data types in C.
Answer Posted / jugad
#include
#include
int main()
{
printf(“%d %d %d %d”,sizeof(int),sizeof(unsigned
int),sizeof(float),sizeof(char));
getch();
return 0;
}
courtesy:http://answerwale.co.cc/?p=23
| Is This Answer Correct ? | 21 Yes | 7 No |
Post New Answer View All Answers
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
What is a built-in function in C?
Do string constants represent numerical values?
Is linux written in c?
Is main is a keyword in c?
What is volatile variable in c with example?
What is the difference between memcpy and memmove?
what are bit fields? What is the use of bit fields in a structure declaration?
Write a program to use switch statement.
what type of questions arrive in interview over c programming?
What are the 4 types of functions?
Explain the priority queues?
What is the scope of local variable in c?
What functions are used in dynamic memory allocation in c?