Showing posts with label Find. Show all posts
Showing posts with label Find. Show all posts
Tuesday, 8 April 2014
How to hide a folder without Any software-cmd Tricks-No one can't find the folder
Monday, 31 March 2014
C Program | To Find ASCII Value of a Character-Source code
C Program | To Find ASCII Value of a Character
Source code:-)
/* Source code to find ASCII value of a character entered by user */
#include <stdio.h>
int main(){
char c;
printf("Enter a character: ");
scanf("%c",&c); /* Takes a character from user */
printf("ASCII value of %c = %d",c,c);
return 0;
}
Output:-)
Enter a character: G
ASCII value of G = 71
C Program | Find odd or even using conditional operator
C Program-Find odd or even using conditional operator
Source Code :-)
#include<stdio.h>
main()
{
int n;
printf("Input an integer\n");
scanf("%d",&n);
n%2 == 0 ? printf("Even\n") : printf("Odd\n");
return 0;
}
C Program-Find Size of int, float, double and char of System-Syntax-Source Code-Output
C Program-Find Size of int, float, double and char of System
Syntax of size of Operator:-
temp = sizeof(operand);
/* Here, temp is a variable of type integer,i.e, sizeof() operator
returns integer value. */
Source Code :-)
/* This program computes the size of variable using sizeof operator.*/
#include <stdio.h>
int main()
{
int a;
float b;
double c;
char d;
printf("Size of int: %d bytes\n",sizeof(a));
printf("Size of float: %d bytes\n",sizeof(b));
printf("Size of double: %d bytes\n",sizeof(c));
printf("Size of char: %d byte\n",sizeof(d));
return 0;
}
OUTPUT :-)
Size of int: 4 bytes
Size of float: 4 bytes
Size of double: 8 bytes
Size of char: 1 byte
Subscribe to:
Posts (Atom)