scanf() is an input function.
It takes an input from the user and store it in a variable.
Since "&" is a reference operator and it represents the memory location of the variable.
String is a type of array and an array consumes more than one memory address.
It is obvious that no need to use "&" operator for an entire array.
For an individual data type like int , char , float etc , "&" is needed but for an array no need to use "&".
#include void main() { int i=2,m,n; printf("enter number"); scanf("%d",&n); do { m=i*n; printf("%d*%d=%d\n",n,i,m); i=i+1; } while (i<=10); }
int i, largest=0;do { scanf ("Enter a number (0 to exit): %d", i); if (i>largest) largest=i; } while (i!=0); printf ("Largest number is: %d\n", largest);
#include<stdio.h> main() { int a,i=1; printf("Enter max no"); scanf("%d",&a); do { printf("%d",i); i=i+2; }while(i<=a); }
#include <stdio.h> main() { FILE *a; int sno,tm,em,mm,scm,sm,hm; char sname[20],any[1]; clrscr(); a=fopen("student.dat","a"); do { printf("Enter Student Number : "); scanf("%d",&sno); printf("Enter Student Name : "); scanf("%s",sname); printf("Enter Telugu Marks : "); scanf("%d",&tm); printf("Enter English Marks : "); scanf("%d",&em); printf("Enter Maths Marks : "); scanf("%d",&mm); printf("Enter Science Marks : "); scanf("%d",&scm); printf("Enter Social Marks : "); scanf("%d",&sm); printf("Enter Hindi Marks : "); scanf("%d",&hm); fprintf(a,"%d %s %d %d %d %d %d %d\n",sno,sname,tm,em,mm,scm,sm,hm); printf("Do you wish to continue(Y/N)"); scanf("%s",any); }while(strcmp(any,"y")==0); fclose(a); }
In C we use & operator while giving address of some variable to some pointer variable. & operator is also used in scanf().
The advantages of using an acoustic guitar with nylon strings over steel strings include a softer and warmer tone, easier playability for beginners due to lower tension, and a more comfortable feel on the fingers while playing.
To achieve a beautiful sound while stringing a classical guitar with nylon strings, make sure to properly stretch and tune the strings, maintain proper tension, and adjust the height of the strings at the bridge and nut for optimal playability and tone. Additionally, using high-quality strings and regularly cleaning and conditioning the strings can help enhance the sound quality.
#includevoid main(){char str1[10],str2[10];int i=0;int flag = 0;printf("enter first string\n");scanf("%s",str1);printf("enter second string\n");scanf("%s",str2);while(str1[i]!='/0' && str2[i]!='/0'){if(str1[i]!=str2[i])flag=1;if(flag==1){printf("not equal\n");break;}if (flag==0){printf("equal\n");break;}}}
To effectively mute the strings on a guitar, you can use your fretting hand to lightly touch the strings above the fret you are playing, while also using your picking hand to lightly touch the strings below the fret you are playing. This technique helps to prevent unwanted string noise and maintain a clean sound while playing.
To mute strings on the guitar effectively, you can use your fretting hand to lightly touch the strings above the fret you are playing, while also using your picking hand to lightly touch the strings below the fret you are playing. This technique helps prevent unwanted string noise and ensures a clean sound while playing.
do statement; while (condition);ordo { statements } while (condition);
Guitar strings hurt your fingers because they create pressure and friction on your fingertips. To reduce discomfort while playing, you can try using lighter gauge strings, building calluses on your fingertips, adjusting your playing technique, and taking breaks to rest your fingers.
mystrcpy (char* dest, char* src) { while ((*dest++ = *src++) != '\0); }
Wound strings are made by wrapping a thin wire around a core, while unwound strings are solid. Wound strings produce a warmer, richer tone due to the wire wrapping, while unwound strings have a brighter, crisper sound.
When choosing guitar strings, consider the type of music you play and your playing style. Lighter gauge strings are easier to play, while heavier gauge strings produce a fuller sound. To maintain your strings, wipe them down after playing to remove oils and dirt, and consider using a string cleaner. Replace strings regularly to keep your guitar sounding its best.
%c and %s are format characters used for input and output. These are mainly used in scanf and printf statements. %c is used for characters while %s is used for strings. For input, it is used to specify the type of the value to be read while for output, it is used to specify the type of the value to be printed.
There are two different kind of strings. There are nylon strings and steel strings. Nylon strings are found on acoustic guitars while steel strings are common to find on electronic guitars.