c - What is (void)(p) doing here? -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 8 जवाब
  • 2 जवाब

    मैं कोड की जांच कर रहा था और मुझे निम्नलिखित स्निपेट पर आया था:

      int check (char * a) {(शून्य) (ए); // यह लाइन क्या कर रही है ?? वापसी 0; } Int main (शून्य) {char * p; पी = (चार *) मॉलोक (आकारफ (चार)); (पी) की जांच; वापसी 0; }   

    (शून्य) (ए); क्या कर रहा है?

    फ़ंक्शन में किसी फ़ंक्शन पैरामीटर का उपयोग नहीं किया गया है तो कुछ संकलक चेतावनी दे सकता है, (शून्य) एक ऐसी चेतावनियां चुप्पी कर सकता है।

    एक और यह प्राप्त करने के लिए आम तरीका है:

      int चेक (char * a) {a = a; वापसी 0; }    

Comments

Post a Comment

Popular posts from this blog

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

sql - PostgreSQL automatically update row at specific date -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -