![]() Related Questions Q1. write a program to find a given number is armstrong number or not ?Q2write a program which accepts a filename as a command line argument and reverse the contents of the file(i.e first character becomes the last character of the file and so on ?Q3 how can i call a function given its name as a string ?Q4 How to swap low-order byte and high order byte in an integer without using temporary variable?Q5 If we develop a project in C, then how can we create an .exe file of it?Q6 how to print 1 to 100 please let me know the answers to my email address as i having the interview in TCS so please please please please let me know Read Answers (18) | Asked by : M.srilatha What is the output of the following program#includevoid main(){printf("%d%d",sizeof('a'),sizeof("a")); Latest Answer : #include#includevoid main(){ int a,i;clrscr();printf( " enter the number");scanf("%d",&a);for(i=a;i 1) If either operand of an arithmetic operator is unsigned long, the other operand is promoted to unsigned long. 2) If either operand of an arithmetic operator is unsigned int, the other operand Latest Answer : Here we cant say the default promotion without knowing the other operand.But if two operands are of different datatypes and the arithmetic operation is performed on these operands the compiler allocates the memory of higher datatype for the resulting ... Read Answers (1) | Asked by : Ashish int *ptr = (int *)malloc(100*(sizeof(int)));ptr++;free(ptr); Latest Answer : it will allocate 200 bytes of memory and returns pointer to the first location...correct me if iam wrongregardsumesh ... View Question | Asked by : Pankaj sharma` Latest Answer : #include#includevoid main(){int x,y,z;clrscr();printf("enter the number");scanf("%d",&x);while(x>0){y=x%10;printf("%d",y);x=x/10;}getch();} ... We have a 2 arrays e.g. arr1[]={2,3,4,4,5,6,7} , arr2[]={1,2,2,4,6,8,8} . Assuming that both the arrays are sorted , if we want to write a program to find common numbers present in both arrays , how do we do that ? Note that nested for loop has a complexity of n2 , hence avoid nested for loop. Latest Answer : Here is the code for finding the size of data types without using sizeof() #include#define size_of(data) ( (char *)(&data +1) - (char *)(&data))int main(){ int INT; char CHAR; ...
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||