EmbLogic's Blog

Author Archives: nj_garg

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; } … Continue reading →

Posted in Data Structures with C | 1 Comment

todays work

program of scripting (password entry) pswrd=secret count=0 while (:) do while ($count!=3) do echo Enter Password read pss if [$pss!=$pswrd] then echo incorrect password try again else echo welcome fi `expr $count + 1` done echo want to change the … Continue reading →

Posted in Uncategorized | Leave a comment

today’s work

class assignment is done

Posted in Uncategorized | Leave a comment

assignment 2

Assignment 2 is completed except quest. 5

Posted in Uncategorized | Leave a comment

Today’s work

Assignment 1 completed except ques. 6,4 and 24.

Posted in Uncategorized | Leave a comment