#include<stdio.h> #include<conio.h> void main () { int a,b,ans=0; printf("enter value to convert in binary"); scanf("%d",&a); while(a!=0) { b=a%2; a=a/2; ans=ans*10+b; } printf("ans is %d",ans); getch(); }
using c-strings write a program that will analyse the text"1.1my brother is taller than me.1.2 I am a boy of sixteen years old". The program should remove multiple spaces betweem words,find the longest word in the text,search and identify the number of letters"e", extact the number of integers , extract the number of doubles, extract the number of words in each sentence and identify the number of sentences in the text.
A variable carries a value.(already assigned OR from Scanf..what ever the way). I want to know whether the variable is positive or negative. Conditions: ----------- 1.NO looping logic should be used such as for ..while..etc.
2.should not use > or <.
3.should not use any numbers except 0. We can use 0 and equality operator. How to know the number is positive or negative?
Q.8 When a 'C' function call is made, the order in which parameters passed to the function are pushed into the stack is (a) left to right (b) right to left (c) bigger variables are moved first than the smaller variables. (d) smaller variables are moved first than the bigger ones (c) none of the above.