Skip to main content

Hello World C Problem

Hello World C Problem

In this post, we will give some problems which are based on our Hello World Program in C post. Please try to solve these problems by yourself before googling or looking at our solutions.


  1. Write a C program that prints your name
          Output
          Name: Your Name
         Solution

    2. Write a C program that prints your name, school/college name, branch
         Output:
          Name: Your Name
          School/College Name: Your School/College Name
          Branch: Your Branch
          Solution

Note: For newline you can you can '\n'.  
Example: printf("Hello World\n")

Comments

Popular posts from this blog

Function

Function A function is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output. Representation - Cartesian  product  of 2 sets is mapping every element to every element of other set. It is generally represented as X A={"a","b"}, B={"y","z"} then A X B= {("a","y"),("a","z"),(b,y),(b,z)} Relation: A Relation R from a non-empty set A to a non empty set B is a subset of cartesian product A X B. n(A)= number of element in set A. n(B)= number of element in set B. Let 's say n(A)=p, n(B)=q n(A X B)=pq then no of relations possible from A to B is 2^pq A relation f from a set A to a set B is said to function if every element of set A has one and only one image in set B. Relation: A function f is X to Y then f: X->Y X is called domain set, Y is called range function. Functions are generally represented as  f ( x ) L...

OFFSET in Computer Science

OFFSET in Computer Science In the post, We will understand what is the meaning of OFFSET in computer science with an example. In computer science offset comes picture at may place like packing a data structure, encoding the data etc in some standard protocol so that other parties can deserialise it and understand the data. We will understand its important how does it work with example. suppose we have a data structure for a student like { name:string[20] roll: int[4] course: string[25] batch: int[4] } We want to serialise below student data  { name:"Amit Gupta" roll: 1234 course:Computer Science" batch: 2018 } Our protocol follow the rule that we will insert a value and if space will remain empty we will fill it with $ for example length of "Amit Gupta" is 10 but standard size is 20 so will fill 10 $ after "Amit Gupta". So serialisation of above data will be Amit Gupta$$$$$$$$$$1234Computer Sc...

Install Virtual Environment

VIRTUAL ENV Virtualenv is a tool to create an isolated Python environment. In this post, we will learn how to setup virtualenv on ubuntu. Prerequisite pip Install Virtualenv If you have pip3  sudo pip3 install virtualenv if you have pip sudo pip install virtualenv Create a Virtualenv virtualenv venv venv is a directory in which virtual environment will be created. Working with Virtualenv source venv/bin/activate Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

What is the difference between library and framework?

What is the difference between library and framework? In this post, We will learn about the very confusing term library and framework that widely used in software. Library and Framework Library: Library is a code repository that your code call. For example, curl is a library that can be called by your code. Framework: In a framework, framework call your code. For example, Django is a framework in which you keep your code in a particular structure can Django call your code compilation and execution purpose. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.