Q: Write a program to print Hello Mars
Q: Write a program to print Sun in first line, Moon in second line and Earth in third line
Q: Decleare valiables with following datatype and values. char variable with 'A' int variable with 10 float variable with 12.5 double variable with 12.5 print it using printf
Q: Decleare three integer variables val1, val2 and sum. take input from user and assign to val1 and val2. add val1 and val2 and store result in sum. print the value of sum.
Q: Write a Program to swap two integers without using third variable
Q: What is the output of following program
#include <stdio.h>
int count = 10;
int main()
{
int count = 11;
printf("Count: %d\n", count);
return 0;
}
Q: What is the output of following program
#include <stdio.h>
int main()
{
const int index = 1;
printf("index: %d\n", index);
index = 2;
printf("index: %d\n", index);
return 0;
}
Q: What is the output of following program
#include <stdio.h>
int main()
{
int physics_marks = 80;
printf("physics: %d, math: %d\n", physics_marks, math_marks);
return 0;
}
Q: What is the output of following program
#include <stdio.h>
int main()
{
int value = 1;
printf("value: %d\n", value);
value = 2;
printf("value: %d\n", value);
printf("value: %d\n", value++);
printf("value: %d\n", ++value);
printf("value: %d\n", value);
return 0;
}
Q: Write a Program to print size of char, int, float, double using sizeof operator
Q: There is a Carpainter who is used to calculate its daily wage based on the square footage of work done. he is charging 250 rupees per square foot. Write a Program to calculate his wage, take length and widh from user input.
Q: Write a Program to store your phone number into a variable, take input from user and print using printf
Q: Write a program to reverse a number. for example: input: 12345 output: 54321
©2023-2024 rculock.com