today question 10 of assignment one..
today question 10 of assignment one..
#include
int main()
{
std::printf(“Strings:\n”);
const char* s = “Hello”;
std::printf(“\t.%10s.\n\t.%-10s.\n\t.%*s.\n”, s, s, 10, s);
std::printf(“Characters:\t%c %%\n”, 65);
std::printf(“Integers\n”);
std::printf(“Decimal:\t%i %d %.6i %i %.0i %+i %u\n”, 1, 2, 3, 0, 0, 4, -1);
std::printf(“Hexadecimal:\t%x %x %X %#x\n”, 5, 10, 10, 6);
std::printf(“Octal:\t%o %#o %#o\n”, 10, 10, 4);
std::printf(“Floating point\n”);
std::printf(“Rounding:\t%f %.0f %.32f\n”, 1.5, 1.5, 1.3);
std::printf(“Padding:\t%05.2f %.2f %5.2f\n”, 1.5, 1.5, 1.5);
std::printf(“Scientific:\t%E %e\n”, 1.5, 1.5);
std::printf(“Hexadecimal:\t%a %A\n”, 1.5, 1.5);
}
Output:
Strings:
. Hello.
.Hello .
. Hello.
Characters: A %
Integers
Decimal: 1 2 000003 0 +4 4294967295
Hexadecimal: 5 a A 0×6
Octal: 12 012 04
Floating point
Rounding: 1.500000 2 1.30000000000000004440892098500626
Padding: 01.50 1.50 1.50
Scientific: 1.500000E+00 1.500000e+00
Hexadecimal: 0×1.8p+0 0X1.8P+0
Also , the %g operator strips off all the precision digits.
working of sizeof((int),float))
working of printf(“%o”,sizeof(sizeof(5.0)))
trying hand on shared memory was bit familiar as it resemble semaphore in terms of system call format,i hope using it for our project scenario today,
hi, learning about socket, i implemented it to a standalone system to communicated between a client and server process , for this i used system call socket,bind,listen,accept,close in the respective sequence in server process and in client i used socket, connect and close,the data was send to the server ,processed there and then processed data was returned back to the client , as socket is more significant between two system so i am waiting for it happen ,please suggest me how we can join more than one client process through the single server process using socket
Sir,
Today I devote my entire day to tool chain , I implemented till binutils and looking forward.
In afternoon I have joined Project Manger session in which we discussed about Project and how to make variation in our resume regarding Project.
regards and thanks
Dharmendra Nath Shandilya
Assignment 1 completed except ques. 6,4 and 24.
I had complete assignment question up to 10. and got some problem in this question.
I had complete assignment question up to 23. & got some problem in this question.
6,26.
i had complete assignment qs up to 11.
int x=1;
printf(“\n %d”,~x|x);
output : -1
Unable to implement Shared Memory…….
one process has created Shared Memory and another is using it with same return value…. but problem arises when first and second process attached with the shared memory with different address…………. PLZZZZZZZZZZZZZZ reply soon further work……….
Sir,
I have read process from in the morning, then i join a class discussion with Vrun Sir regarding booting and MBR ,MLO such other related topics regarding booting , after that I have joined session Vaibhav Sir regarding tool-chain.
I gave c test in after noon after test I again go to find out the booting details . At the end of day I was implementing tool-chain in it i have create different directories such as toos,kernels , first i have compiled 2.6.38.8 kernel for it which i found not that it was not fit for it due to lack asm-arm directory so do i am trying to handle with correct kernel version as per guidance of Vaibhav sir , hopefully i will manage it night or till morning.
regards and thanks
Dharmendra Nath Shandilya