When I list the processes executing on my system it displays many kworker/ processes with interruptible sleep (waiting for an event to complete) , an unknown value of tty and many different pids (even if my system is idle). Also … Continue reading
Dear E-14 Trainees, Please update the status of Assignment 01 on the blog post created by Siddarth sir (link: http://emblogic.org/blog/08/e14-assignment-01/). Tomorrow we will be discussing the doubts related to Assignment 01. Please come prepared with your doubts and problems.
declared char *ptr; printed the address allocated to ptr (&ptr), garbage address of ptr (ptr ) and the garbage value (*ptr) Error: Segmentation Fault. Can you please explain why?
Initializing x,y,z=1 and after applying operation ++x||++y&&++z; The values when printed gives: x=2; y=1; and z=1; It increments the value of x but does not increment the values of y and z. can anyone please explain why?
#include<stdio.h> int main () { printf(“Program to print a pattern of stars.\n”); int i1,i2,i3,val; printf(“Enter a number:\n”); scanf(“%d”,&val); for(i1=0;i1<val*2;i1=i1+2) { for(i3=val*2;i3>i1;i3=i3-2) { printf(” “); } for(i2=0;i2<=i1;i2++) { printf(“*”); } printf(“\n”); } return 0; }
#include<stdio.h> int main () { printf(“Program to print a pattern of stars.\n”); int i1,i2,i3,val; printf(“Enter a number:\n”); scanf(“%d”,&val); for(i1=0;i1<val;i1++) { /*for(i3=val;i3>i1;i3–) { printf(” “); }*/ for(i2=0;i2<=i1;i2++) { printf(“*”); } printf(“\n”); } return 0; } I tried to print a pattern … Continue reading