Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Int to 4 bytes
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int a = 59457; Console.WriteLine(BitConverter.GetBytes(a)[0]+" "+BitConverter.GetBytes(a)[1]+" "+BitConverter.GetBytes(a)[2]+" "+BitConverter.GetBytes(a)[3]); byte[] buffer = new byte[4]; buffer[0] = (byte) a; buffer[1] = (byte) (a >> 8); buffer[2] = (byte) (a >> 0x10); buffer[3] = (byte) (a >> 0x18); Console.WriteLine(buffer[0]+" "+buffer[1]+" "+buffer[2]+" "+buffer[3]); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Write a program to sort given array using bubble sort.
Vajdalinky
asxasxd
Compiler
Prime
Practicando C#
constructor execution sequence
Builder Design Pattern
sdfrgthyjukiujyht5r4der
pass-len-to-predicate-modified
Please log in to post a comment.