/*what is the output for*/
void main()
{
int r;
printf("Naveen");
r=printf();
getch();
}
Answers were Sorted based on User's Feedback
Answer / prathiba
its a compile time error.bcoz r is of integer type.
| Is This Answer Correct ? | 7 Yes | 5 No |
Answer / srikanth
compile time error..r is of type integer,so the could is wrong
| Is This Answer Correct ? | 3 Yes | 1 No |
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)
Write a program to print a square of size 5 by using the character S.
main() { printf("%d, %d", sizeof('c'), sizeof(100)); } a. 2, 2 b. 2, 100 c. 4, 100 d. 4, 4
18 Answers HCL, IBM, Infosys, LG Soft, Satyam,
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }
How can you relate the function with the structure? Explain with an appropriate example.
Printf can be implemented by using __________ list.
Give a one-line C expression to test whether a number is a power of 2.
Sir... please give some important coding questions asked by product companies..
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }
Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.
5 Answers IITR, Microsoft, Nike,