WAP – represent a char in binary format
Answers were Sorted based on User's Feedback
Answer / vinayml
main()
{
char p = 'a' ;
int i = 0 ;
for( i = 0 ; i < 8 ; i++)
( p & (1 << i )) ?printf ("1"): printf("1");
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / johnson
?eh? this doesn't make sense. The answer will obviously be
11111111.
| Is This Answer Correct ? | 0 Yes | 0 No |
Finding first/last occurrence of a character in a string without using strchr( ) /strrchr( ) function.
. A database table called PERSON contains the fields NAME, BASIC and HRA. Write a computer program to print a report which employee name and total salary for those employees whose total salary is more than 10,000. Total Salary = BASIC + HRA. At the end, the program should also print the total number of employees whose total salary is more than 10,000.
Write one statement equalent to the following two statements x=sqr(a); return(x); Choose from one of the alternatives a.return(sqr(a)); b.printf("sqr(a)"); c.return(a*a*a); d.printf("%d",sqr(a));
What is pivot in c?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
What is the hardest programming language?
What is the o/p of the follow pgm? #include<stdio.h> main() { char char_arr[5]=”ORACL”; char c=’E’; prinf(“%s\n”,strcat(char_arr,c)); } a:oracle b. oracl c.e d.none
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?
28 Answers 3D PLM, Code Studio, Deltech, IBM,
10. Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",s); } What will happen if it is compiled & run on an ANSI C Compiler? A)It will compile & nothing will be printed when it is executed B)it will compile but not link C)the compiler will generate an error D)the compiler will generate a warning
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
How pointer is different from array?