EmbLogic's Blog

compression for 16 unique character completed

i have successfully completed the compression

Posted in Uncategorized | Leave a comment

Wi-fi related problem

i had installed both fedora 15 and windows 7 OS on my system . Wi-fi is running succesfully on windows platform but in fedora 15 it shows firmware missing…

how to rectify this problem

Posted in Uncategorized | 1 Comment

issue in assignement 1

in qo 3 how airthmetic operators are performing

Posted in Data Structures with C | 2 Comments

issue in printf

Can any one tell me how printf is executing….

Posted in Data Structures with C | 1 Comment

query regarding bit shift operations

#include<stdio.h>
int main()
{
int i=255;
i=i<<24;
i=i>>24;
printf(“%d”,i);
return 0;
}

output is : -1

how??

Posted in Uncategorized | 3 Comments

a query for int overflow

int i=2147483647;

printf(“%d %d %d\n”,i,i+1,i+2);

output 
2147483647  – 2147483648  -2147483647

 

is this the case of INTEGER OVERFLOW?? JUSTIFY…

Posted in Uncategorized | 5 Comments

ZTE-Reliance CDMA USB modem is not working with fedora 15

Hi All,

My Reliance netconnect+ modem is not working with fedora 15. It is getting detected and initialized but is not able to connect.I have tried it connecting with  NetworkManager as well as usb_modeswitch and wvdial but results are same.

Also I am unable to start my network service

systemctl start network.service –> Job FAILED

Any advice on this is highly appreciated.

Thanks

Posted in Uncategorized | Leave a 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++)
{
printf("index = %d, bits = %d %d %d\n", number.index,number.bits.z, number.bits.y, number.bits.x);
}

return 0;
}

Posted in Uncategorized | 1 Comment

how to take string as input from the user ???

#include<string.h>
#include<stdio.h>
#include<stdlib.h>

int main()
{
int d;
printf(“enter size of the string\n”);
scanf(“%d”,&d);
char a[100];
char *p;
p = malloc(sizeof(char)*d);

printf(“enter the string\n”);
fflush(stdin);
fgets(p,d,stdin);                             //didn’t worked with gets(p)?????????
int i,j,count=0,flag=0;
for(i=0;i<=”;i++)
{
for(j=0;j<i;j++)
{
if(*(p+i)==a[j])
{
flag=-1;
}
}
if(flag==0)
{
a[count++]=*(p+i);
}
flag=0;
}
printf(“modified array is \n”);
for(j=0;j<”;j++)
{
printf(“%c”,a[j]);
}
}

 

Posted in Data Structures with C | 1 Comment

how the parenthesis is used

#define CELCS(far) ((1.8*far)+32.0)

here what is doing the parenthesise() in define statement.

please explain.

Posted in Uncategorized | Leave a comment

warning on arrays

{

char r[10]=”this is a”;
char d[10]={{‘t’},{‘h’},{‘i’},{‘s’},{‘ ‘},{‘i’},{‘s’},{‘ ‘},{‘a’}};

printf(“string r[10]  %s  size %d\n”,r,sizeof(r));
printf(“single character d[10] %s size %d\n”,d,sizeof(d));

return 0;

}
during compilation it gives warning WHY ?

what wrong i had done in char d[10] ?

warning: braces around scalar initializer [enabled by default]

warning: (near initialization for ‘d[0]’) [enabled by default]

Posted in Data Structures with C | 2 Comments

assignment 1,ques26..?how to implememnt it..

anybody attempted it?

Posted in Data Structures with C | Leave a comment

query regarding Assignment1 question 13

printf(“%d%d%d\n”,i,i+1,i+2);

Why the output is in -ve  for i+1 and  i+2?
2147483647 – 2147483648 -2147483647

Posted in Data Structures with C | 2 Comments

Character Device Driver Status To Pravjot Sir

I have done following:

  1. Write operation for multiple quantums…
  2. Read operation for single quantum.
  3. Implemented Semaphore in read and write operation

Now I am working on spinlocks and completions ………….

###NOTE ——– SPIN LOCKS are heavy weight mechanism/process than what is the proper application of SPIN LOCKS

Posted in Character Driver | Leave a comment

structure problem

i want to initialise structure array only when needed. what to do

Posted in Data Structures with C | Leave a comment