EmbLogic's Blog

Author Archives: hemant.kumar

int arr[256]={0}; int c; while((c=getchar())!=’\n’) arr[c]=1; printf(“%c \n”,c); //printable characters for(c=32;c<127;c++) { if(arr[c]) putchar(c); } i have made this but not able to understand this code what’s happeninf actually

Posted in Uncategorized | 2 Comments

LINKED LIST

#include<stdio.h> #include<stdlib.h> struct node { int data; struct node *next; }; typedef struct node item; void main() { item *head[10]; int i; for(i=0;i<10;i++) { head[i]=malloc(sizeof(struct node)); head[i]->data=i+5; head[i]->next=head[i+1]; } head[10]=NULL; for(i=0;i<10;i++) { printf(“Address of head[%d] is %p and value is … Continue reading →

Posted in Uncategorized | 1 Comment

Shuts down

Sir,  computer shuts down so frequently and showing instat error  … .. should i format ??  

Posted in Uncategorized | 1 Comment

BIT_FIELDS

#include #include #include union { int index; struct { unsigned int x : 1; unsigned int y : 1; unsigned int z : 2; } bits; } number; int main() { for (number.index = 0; number.index < 20; number.index++) { … Continue reading →

Posted in Uncategorized | 1 Comment

#include int main() { int i,k; for(k=1;k<=10;k++) { i=getchar(); putchaar(i); return 0; } //my doubt is…Why loop is executing 5 times instead of 10…

Posted in Uncategorized | 2 Comments

while( (c=getchar())!= EOF)

sir not able to get this….

Posted in Uncategorized | 2 Comments