No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
In this program i have put numeric value in char variable. Trying to observe what happens when using %d and %c specifier. void main() { char ch=23; printf("value:%c",ch); getch(); } here when i use %d i get value:23 when i use %c i get some odd char. why the result … | |
suppose i have defined constant using #define MAX 5 and i am using it in function called find() as shown below: find() { if (MAX==5) { //do this; } else { //do this; } } ** If i am calling this function 100 of times** then which way is better … | |
I have written one small program to check whether particular bit is set or not. But not getting proper value when i check for upper nibble. #define check(var,pos) ((var)&(1<<pos)) void main() { int var=30;// in binary 0011 0000 that is its 4th and 5th bits are set; int bit; printf("enter … | |
Re: I have written one program in which i am passing a pointer to a structure to function called display. #include<stdio.h> #include<conio.h> struct data{ int ID; char name[4]; }; typedef struct data record; void display(record *[]); record emp[2]; int i; void main() { record *ptr; ptr=&emp[0]; clrscr(); for(i=0;i<2;i++) { printf("enter name"); … |
The End.