Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a Go program to calculate the SHA256 hash of a given string.

Medium

Problem Statement

Write a Go program to calculate the SHA256 hash of a given string.

Sample Input

A string (e.g., "Hello, World!").

Sample Output

SHA256 Hash: dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
package main import "fmt" func main() { // Calculate and print the SHA256 hash of a string }
Log in or sign up to run or submit your code.Log inSign up
Input
A string (e.g., "Hello, World!").
Expected Output
SHA256 Hash: dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f